JDBC driver

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

JDBC driver

gnorman22
I've been working on a JDBC driver for the latest version of Sqlite (3.2.8).  I know that someone has already written 1 for an older version, and I really didn't intend to reinvent the wheel.  However, I wanted to learn Sqlite and how to write a JDBC driver and this sort of evolved.  If this is this something that anyone would be interested in looking at, I'd be happy to share what I have.  

Let me know.
Reply | Threaded
Open this post in threaded view
|

Building sqlite 3.2.8 on redhat 9

Lloyd Thomas
I am having a problem building sqlite on my redhat 9 box. There seems to be
a problem with TCL. I am no linux guru, so it some one can poinjt me in the
right direction that would be great.

here is as far as I get
----------------------------------------------------

[root@opox sqlite-3.2.8]# make
./libtool --mode=compile
gcc -g -O2 -DOS_UNIX=1 -DHAVE_USLEEP=1 -I. -I./src -DNDEBUG  -DTHREADSAFE=0  
-DSQLITE_OMIT_CURSOR -c ./src/tclsqlite.c
 gcc -g -O2 -DOS_UNIX=1 -DHAVE_USLEEP=1 -I. -I./src -DNDEBUG -DTHREADSAFE=0  
-DSQLITE_OMIT_CURSOR -c ./src/tclsqlite.c  -fPIC -DPIC -o .libs/tclsqlite.o
src/tclsqlite.c: In function `tclSqlFunc':
src/tclsqlite.c:372: warning: passing arg 1 of `Tcl_NewByteArrayObj'
discards qualifiers from pointer target type
src/tclsqlite.c:380: warning: assignment makes pointer from integer without
a cast
src/tclsqlite.c:438: `Tcl_WideInt' undeclared (first use in this function)
src/tclsqlite.c:438: (Each undeclared identifier is reported only once
src/tclsqlite.c:438: for each function it appears in.)
src/tclsqlite.c:438: parse error before "v"
src/tclsqlite.c:439: `v' undeclared (first use in this function)
src/tclsqlite.c: In function `DbObjCmd':
src/tclsqlite.c:636: warning: passing arg 3 of `Tcl_GetIndexFromObj' from
incompatible pointer type
src/tclsqlite.c:1252: warning: passing arg 2 of `Tcl_GetVar2Ex' discards
qualifiers from pointer target type
src/tclsqlite.c:1274: `Tcl_WideInt' undeclared (first use in this function)
src/tclsqlite.c:1274: parse error before "v"
src/tclsqlite.c:1275: `v' undeclared (first use in this function)
src/tclsqlite.c:1325: warning: passing arg 1 of `Tcl_NewByteArrayObj'
discards qualifiers from pointer target type
src/tclsqlite.c:1333: warning: assignment makes pointer from integer without
a cast
src/tclsqlite.c:1773: warning: passing arg 3 of `Tcl_GetIndexFromObj' from
incompatible pointer type
src/tclsqlite.c: In function `DbMain':
src/tclsqlite.c:1918: warning: passing arg 2 of `Tcl_CreateObjCommand'
discards qualifiers from pointer target type
make: *** [tclsqlite.lo] Error 1
------------------------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: Building sqlite 3.2.8 on redhat 9

Dan Kennedy
If possible, the easiest way around this is to install Active-tcl.
Or compile the tcl library yourself. For a long time the stock tcl
install in redhat was problematic.

http://www.activestate.com/Products/ActiveTcl/




--- Lloyd Thomas <[hidden email]> wrote:

> I am having a problem building sqlite on my redhat 9 box. There seems to be
> a problem with TCL. I am no linux guru, so it some one can poinjt me in the
> right direction that would be great.
>
> here is as far as I get
> ----------------------------------------------------
>
> [root@opox sqlite-3.2.8]# make
> ./libtool --mode=compile
> gcc -g -O2 -DOS_UNIX=1 -DHAVE_USLEEP=1 -I. -I./src -DNDEBUG  -DTHREADSAFE=0  
> -DSQLITE_OMIT_CURSOR -c ./src/tclsqlite.c
>  gcc -g -O2 -DOS_UNIX=1 -DHAVE_USLEEP=1 -I. -I./src -DNDEBUG -DTHREADSAFE=0  
> -DSQLITE_OMIT_CURSOR -c ./src/tclsqlite.c  -fPIC -DPIC -o .libs/tclsqlite.o
> src/tclsqlite.c: In function `tclSqlFunc':
> src/tclsqlite.c:372: warning: passing arg 1 of `Tcl_NewByteArrayObj'
> discards qualifiers from pointer target type
> src/tclsqlite.c:380: warning: assignment makes pointer from integer without
> a cast
> src/tclsqlite.c:438: `Tcl_WideInt' undeclared (first use in this function)
> src/tclsqlite.c:438: (Each undeclared identifier is reported only once
> src/tclsqlite.c:438: for each function it appears in.)
> src/tclsqlite.c:438: parse error before "v"
> src/tclsqlite.c:439: `v' undeclared (first use in this function)
> src/tclsqlite.c: In function `DbObjCmd':
> src/tclsqlite.c:636: warning: passing arg 3 of `Tcl_GetIndexFromObj' from
> incompatible pointer type
> src/tclsqlite.c:1252: warning: passing arg 2 of `Tcl_GetVar2Ex' discards
> qualifiers from pointer target type
> src/tclsqlite.c:1274: `Tcl_WideInt' undeclared (first use in this function)
> src/tclsqlite.c:1274: parse error before "v"
> src/tclsqlite.c:1275: `v' undeclared (first use in this function)
> src/tclsqlite.c:1325: warning: passing arg 1 of `Tcl_NewByteArrayObj'
> discards qualifiers from pointer target type
> src/tclsqlite.c:1333: warning: assignment makes pointer from integer without
> a cast
> src/tclsqlite.c:1773: warning: passing arg 3 of `Tcl_GetIndexFromObj' from
> incompatible pointer type
> src/tclsqlite.c: In function `DbMain':
> src/tclsqlite.c:1918: warning: passing arg 2 of `Tcl_CreateObjCommand'
> discards qualifiers from pointer target type
> make: *** [tclsqlite.lo] Error 1
> ------------------------------------------------------------------------------------------
>
>



       
               
__________________________________
Yahoo! for Good - Make a difference this year.
http://brand.yahoo.com/cybergivingweek2005/
Reply | Threaded
Open this post in threaded view
|

Re: Building sqlite 3.2.8 on redhat 9

Lloyd Thomas
I have compilted tcl, but had a problem with tk. having compiled sqlite3 I
get a new error trying to run sqlite3 =
'sqlite3: error while loading shared libraries: libsqlite3.so.0: cannot open
shared object file: No such file or diretory'

Any Ideas?

Lloyd

----- Original Message -----
From: "Dan Kennedy" <[hidden email]>
To: <[hidden email]>
Sent: Monday, January 02, 2006 5:37 AM
Subject: Re: [sqlite] Building sqlite 3.2.8 on redhat 9


> If possible, the easiest way around this is to install Active-tcl.
> Or compile the tcl library yourself. For a long time the stock tcl
> install in redhat was problematic.
>
> http://www.activestate.com/Products/ActiveTcl/
>
>
>
>
> --- Lloyd Thomas <[hidden email]> wrote:
>
>> I am having a problem building sqlite on my redhat 9 box. There seems to
>> be
>> a problem with TCL. I am no linux guru, so it some one can poinjt me in
>> the
>> right direction that would be great.
>>
>> here is as far as I get
>> ----------------------------------------------------
>>
>> [root@opox sqlite-3.2.8]# make
>> ./libtool --mode=compile
>>
>> cc -g -O2 -DOS_UNIX=1 -DHAVE_USLEEP=1 -I. -I./src -DNDEBUG  -DTHREADSAFE=0
>> -DSQLITE_OMIT_CURSOR -c ./src/tclsqlite.c
>>  gcc -g -O2 -DOS_UNIX=1 -DHAVE_USLEEP=1 -I. -I./src -DNDEBUG -DTHREADSAFE=0
>> -DSQLITE_OMIT_CURSOR -c ./src/tclsqlite.c  -fPIC -DPIC -o
>> .libs/tclsqlite.o
>> src/tclsqlite.c: In function `tclSqlFunc':
>> src/tclsqlite.c:372: warning: passing arg 1 of `Tcl_NewByteArrayObj'
>> discards qualifiers from pointer target type
>> src/tclsqlite.c:380: warning: assignment makes pointer from integer
>> without
>> a cast
>> src/tclsqlite.c:438: `Tcl_WideInt' undeclared (first use in this
>> function)
>> src/tclsqlite.c:438: (Each undeclared identifier is reported only once
>> src/tclsqlite.c:438: for each function it appears in.)
>> src/tclsqlite.c:438: parse error before "v"
>> src/tclsqlite.c:439: `v' undeclared (first use in this function)
>> src/tclsqlite.c: In function `DbObjCmd':
>> src/tclsqlite.c:636: warning: passing arg 3 of `Tcl_GetIndexFromObj' from
>> incompatible pointer type
>> src/tclsqlite.c:1252: warning: passing arg 2 of `Tcl_GetVar2Ex' discards
>> qualifiers from pointer target type
>> src/tclsqlite.c:1274: `Tcl_WideInt' undeclared (first use in this
>> function)
>> src/tclsqlite.c:1274: parse error before "v"
>> src/tclsqlite.c:1275: `v' undeclared (first use in this function)
>> src/tclsqlite.c:1325: warning: passing arg 1 of `Tcl_NewByteArrayObj'
>> discards qualifiers from pointer target type
>> src/tclsqlite.c:1333: warning: assignment makes pointer from integer
>> without
>> a cast
>> src/tclsqlite.c:1773: warning: passing arg 3 of `Tcl_GetIndexFromObj'
>> from
>> incompatible pointer type
>> src/tclsqlite.c: In function `DbMain':
>> src/tclsqlite.c:1918: warning: passing arg 2 of `Tcl_CreateObjCommand'
>> discards qualifiers from pointer target type
>> make: *** [tclsqlite.lo] Error 1
>> ------------------------------------------------------------------------------------------
>>
>>
>
>
>
>
>
> __________________________________
> Yahoo! for Good - Make a difference this year.
> http://brand.yahoo.com/cybergivingweek2005/ 

Reply | Threaded
Open this post in threaded view
|

Re: Building sqlite 3.2.8 on redhat 9

Arjen Markus
Lloyd Thomas wrote:
>
> I have compilted tcl, but had a problem with tk. having compiled sqlite3 I
> get a new error trying to run sqlite3 =
> 'sqlite3: error while loading shared libraries: libsqlite3.so.0: cannot open
> shared object file: No such file or diretory'
>

That seems a common problem with shared objects/libraries ... they have
to
be in the path of the dynamic linker/loader. Have you set
LD_LIBRARY_PATH
properly?

Regards,

Arjen

Reply | Threaded
Open this post in threaded view
|

Re: Building sqlite 3.2.8 on redhat 9

Lloyd Thomas
There does not seem to be a library file in /usr/lib/  called
libsqlite3.so.0. would that be the problem. Please bear with me I am a linux
newbie.

Lloyd
----- Original Message -----
From: "Arjen Markus" <[hidden email]>
To: <[hidden email]>
Sent: Monday, January 02, 2006 12:13 PM
Subject: Re: [sqlite] Building sqlite 3.2.8 on redhat 9


> Lloyd Thomas wrote:
>>
>> I have compilted tcl, but had a problem with tk. having compiled sqlite3
>> I
>> get a new error trying to run sqlite3 =
>> 'sqlite3: error while loading shared libraries: libsqlite3.so.0: cannot
>> open
>> shared object file: No such file or diretory'
>>
>
> That seems a common problem with shared objects/libraries ... they have
> to
> be in the path of the dynamic linker/loader. Have you set
> LD_LIBRARY_PATH
> properly?
>
> Regards,
>
> Arjen
>

Reply | Threaded
Open this post in threaded view
|

Re: Building sqlite 3.2.8 on redhat 9 (off list)

Lloyd Thomas
Thanks Kimball
                        Your right about having a little experience. I am
just running into error after error installing apps, but I'm learnoing
slowly. Anyway, I was trying to install the sqlite support for another
application I want to use and as a side issue it seems to have installed
sqlite 3.2.8 correctly for me. It would be good if I could type sqlite3 at
the prompt and it would just start.

Lloyd


----- Original Message -----
From: "Arjen Markus" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, January 03, 2006 7:51 AM
Subject: Re: [sqlite] Building sqlite 3.2.8 on redhat 9 (off list)


> Lloyd Thomas wrote:
>>
>> There does not seem to be a library file in /usr/lib/  called
>> libsqlite3.so.0. would that be the problem. Please bear with me I am a
>> linux
>> newbie.
>>
>
> Hello Lloyd,
>
> my reply may be a bit too detailed, but I assume you have very little
> experience with Linux/UNIX. So bare with me if the explanations are
> too basic.
>
> What about /usr/local/lib? That is the usual place for
> packages/libraries that
> are not part of the operating system.
>
> You can print the current setting of LD_LIBRARY_PATH by typing:
>
> echo $LD_LIBRARY_PATH
>
> on the prompt.
>
> It is a list of directories that the loader/linker will look at in
> search
> of shared objects. The sqlite3 library must be contained in any of
> these.
>
> If you find it in a different directory not listed there, you need to
> set LD_LIBRARY_PATH:
>
> export LD_LIBRARY_PATH=/your/new/directory:$LD_LIBRARY_PATH
>
> or:
>
> setenv LD_LIBRARY_PATH /your/new/directory:$LD_LIBRARY_PATH
>
> (Presumably the first, the second form is specific to the C-shell, and
> you probably have "bash".)
>
> What directory (the prefix option) did you use for installing
> SQLite? That is the directory where the library will live in (or in
> the subdirectory "lib" of that directory).
>
> Hope this helps.
>
> Regards,
>
> Arjen
>

Reply | Threaded
Open this post in threaded view
|

Re: Building sqlite 3.2.8 on redhat 9 (off list)

Arjen Markus
Lloyd Thomas wrote:
>
> Thanks Kimball
>                         Your right about having a little experience. I am
> just running into error after error installing apps, but I'm learnoing
> slowly. Anyway, I was trying to install the sqlite support for another
> application I want to use and as a side issue it seems to have installed
> sqlite 3.2.8 correctly for me. It would be good if I could type sqlite3 at
> the prompt and it would just start.
>

Hello Lloyd,

you mean the sqlite3 command-line utility? Well, if all else fails,
try it with a small script that you can put in a directory within
your path:

---------------------------
# Run command-line utility sqlite3
#
export LD_LIBRARY_PATH=/your/install/dir/lib:$LD_LIBRARY_PATH
export PATH=/your/install/dir/bin:$PATH

sqlite3
---------------------------

(Store this in a convenient file like "mysqlite" and use:

chmod +x mysqlite

to make it executable)

The environment variables LD_LIBRARY_PATH and PATH are
changed locally. So as soon as you leave the utility
and thus the script, you go back to the original environment.

Regards,

Arjen

Reply | Threaded
Open this post in threaded view
|

Re: Building sqlite 3.2.8 on redhat 9 (off list)

D. Richard Hipp
In reply to this post by Lloyd Thomas
"Lloyd Thomas" <[hidden email]> wrote:
> Thanks Kimball
>                         Your right about having a little experience. I am
> just running into error after error installing apps, but I'm learnoing
> slowly. Anyway, I was trying to install the sqlite support for another
> application I want to use and as a side issue it seems to have installed
> sqlite 3.2.8 correctly for me. It would be good if I could type sqlite3 at
> the prompt and it would just start.
>

Did the precompiled binary on the website not work for you?
http://www.sqlite.org/download.html

--
D. Richard Hipp <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: Building sqlite 3.2.8 on redhat 9 (off list)

Lloyd Thomas
The precompiled version did work. I was just trying to compile it myself to
get experience building a linux box.

Lloyd

----- Original Message -----
From: <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, January 03, 2006 1:29 PM
Subject: Re: [sqlite] Building sqlite 3.2.8 on redhat 9 (off list)


"Lloyd Thomas" <[hidden email]> wrote:
> Thanks Kimball
>                         Your right about having a little experience. I am
> just running into error after error installing apps, but I'm learnoing
> slowly. Anyway, I was trying to install the sqlite support for another
> application I want to use and as a side issue it seems to have installed
> sqlite 3.2.8 correctly for me. It would be good if I could type sqlite3 at
> the prompt and it would just start.
>

Did the precompiled binary on the website not work for you?
http://www.sqlite.org/download.html

--
D. Richard Hipp <[hidden email]>