[SQLiteJDBC] java -cacao issue

Jaap de Jong jaap.dejong at nedap.com
Wed Feb 23 05:43:36 EST 2011


Hi,

I would like to use sqlitejdbc (v056) with openjdk-6 and the cacao vm.
It won't work...

Build sqlitejdbc:

    $ sudo apt-get install openjdk-6-jdk
    $ tar -xzpf sqlitejdbc-v056-src.tgz
    $ cd sqlitejdbc-v056
    $ export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
    $ patch -p1 < ../Makefile.patch
    $ make

    had to patch Makefile.common: remove lines 37..39

Build testsoftware:

    $ javac Test.java

Run it:

    $ export JAR=./sqlitejdbc-v056/build/sqlitejdbc-v056-native.jar
    $ export JNI=./sqlitejdbc-v056/build/Default-i686
    $ java -classpath .:${JAR} -Djava.library.path=${JNI} Test
    name = Gandhi
    job = politics
    name = Turing
    job = computers
    name = Wittgenstein
    job = smartypants

    $ java -cacao -classpath .:${JAR} -Djava.library.path=${JNI} Test
    Exception in thread "main" java.sql.SQLException: no SQLite library
    found
         at org.sqlite.Conn.<init>(Conn.java:83)
         at org.sqlite.JDBC.connect(JDBC.java:64)
         at java.sql.DriverManager.getConnection(DriverManager.java:620)
         at java.sql.DriverManager.getConnection(DriverManager.java:222)
         at Test.main(Test.java:6)

It comes down to the FindClass calls in NativeDB.c.
The call fails under cacao. Why??
Any ideas?
Clues?

Thanks!
Jaap


More information about the SQLiteJDBC mailing list