3.8.7 version Linux issue

Issue #152 new
Former user created an issue

Hello,

We have a java desktop application that has to run in Windows, Linux and Mac. We have been working with sqlite 3.7.2 jdbc driver till yesterday. We have changed for the 3.8.7 version and it crashes in Linux (not in Windows). After it, we have changed to 3.8.6 and it works perfect in both Linux and Windows. Here is the log, i hope it helps:

ava.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.javafx.main.Main.launchApp(Main.java:658) at com.javafx.main.Main.main(Main.java:805) Caused by: java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open(Ljava/lang/String;I)V at org.sqlite.core.NativeDB._open(Native Method) at org.sqlite.core.DB.open(DB.java:161) at org.sqlite.core.CoreConnection.open(CoreConnection.java:145) at org.sqlite.core.CoreConnection.<init>(CoreConnection.java:66) at org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:21) at org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:23) at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:45) at org.sqlite.JDBC.createConnection(JDBC.java:114) at org.sqlite.JDBC.connect(JDBC.java:88) at java.sql.DriverManager.getConnection(DriverManager.java:571) at java.sql.DriverManager.getConnection(DriverManager.java:233) at net.bizkaia.bila.n4li.baseDeDatos.UtilidadesBD.abrirBD(UtilidadesBD.java:115) at net.bizkaia.bila.n4li.persistencia.interfaces.impl.ListaInfoPaquetesBDImp.cargarInstalacionModelos(ListaInfoPaquetesBDImp.java:149) at net.bizkaia.bila.n4li.negocio.interfaces.impl.ListaInfoPaquetesNegocioImp.cargarInstalacionModelos(ListaInfoPaquetesNegocioImp.java:74) at net.bizkaia.bila.n4li.utils.CargaInicial.cargarInstalacionModelos(CargaInicial.java:184) at net.bizkaia.bila.n4pl.Main.arranque(Main.java:77) at net.bizkaia.bila.n4pl.Main.main(Main.java:58) ... 6 more lantik@B097679-Mint ~/Documentos $ java -jar N4PL.jar java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.javafx.main.Main.launchApp(Main.java:658) at com.javafx.main.Main.main(Main.java:805) Caused by: java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open(Ljava/lang/String;I)V at org.sqlite.core.NativeDB._open(Native Method) at org.sqlite.core.DB.open(DB.java:161) at org.sqlite.core.CoreConnection.open(CoreConnection.java:145) at org.sqlite.core.CoreConnection.<init>(CoreConnection.java:66) at org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:21) at org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:23) at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:45) at org.sqlite.JDBC.createConnection(JDBC.java:114) at org.sqlite.JDBC.connect(JDBC.java:88) at java.sql.DriverManager.getConnection(DriverManager.java:571) at java.sql.DriverManager.getConnection(DriverManager.java:233) at net.bizkaia.bila.n4li.baseDeDatos.UtilidadesBD.abrirBD(UtilidadesBD.java:115) at net.bizkaia.bila.n4li.persistencia.interfaces.impl.ListaInfoPaquetesBDImp.cargarInstalacionModelos(ListaInfoPaquetesBDImp.java:149) at net.bizkaia.bila.n4li.negocio.interfaces.impl.ListaInfoPaquetesNegocioImp.cargarInstalacionModelos(ListaInfoPaquetesNegocioImp.java:74) at net.bizkaia.bila.n4li.utils.CargaInicial.cargarInstalacionModelos(CargaInicial.java:184) at net.bizkaia.bila.n4pl.Main.arranque(Main.java:77) at net.bizkaia.bila.n4pl.Main.main(Main.java:58)

Regards,

Xabier

Comments (6)

  1. Andrew Clark

    Same error on 32 bit linux using the Sample.java class supplied here: https://bitbucket.org/xerial/sqlite-jdbc

    aclark@corydoras:0:~/tmp/jdbc$ java -cp "sqlite-jdbc-3.8.7.jar:." Sample 
    Exception in thread "main" java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open(Ljava/lang/String;I)V
            at org.sqlite.core.NativeDB._open(Native Method)
            at org.sqlite.core.DB.open(DB.java:161)
            at org.sqlite.core.CoreConnection.open(CoreConnection.java:145)
            at org.sqlite.core.CoreConnection.<init>(CoreConnection.java:66)
            at org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:21)
            at org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:23)
            at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:45)
            at org.sqlite.JDBC.createConnection(JDBC.java:114)
            at org.sqlite.JDBC.connect(JDBC.java:88)
            at java.sql.DriverManager.getConnection(DriverManager.java:579)
            at java.sql.DriverManager.getConnection(DriverManager.java:243)
            at Sample.main(Sample.java:18)
    

    Reverting to 3.8.6 corrects issue:

    aclark@corydoras:2:~/tmp/jdbc$ java -cp "sqlite-jdbc-3.8.6.jar:." Sample 
    name = leo
    id = 1
    name = yui
    id = 2
    

    It's a 32 bit Debian system with OpenJDK:

    aclark@corydoras:0:~/tmp/jdbc$ java -version
    java version "1.7.0_03"
    OpenJDK Runtime Environment (IcedTea7 2.1.7) (7u3-2.1.7-1)
    OpenJDK Server VM (build 22.0-b10, mixed mode)
    
  2. Andrew Clark

    Having a quick look at the two jars, there does seem to be something missing from the 3.8.7 Linux native library. Here's the strings from the 3.8.6 library that mention NativeDB:

    aclark@corydoras:0:~/tmp/jdbc$ strings 3.8.6/org/sqlite/native/Linux/i386/libsqlitejdbc.so | grep NativeDB
    Java_org_sqlite_core_NativeDB_shared_1cache
    Java_org_sqlite_core_NativeDB_enable_1load_1extension
    Java_org_sqlite_core_NativeDB__1open
    Java_org_sqlite_core_NativeDB__1close
    Java_org_sqlite_core_NativeDB_interrupt
    Java_org_sqlite_core_NativeDB_busy_1timeout
    Java_org_sqlite_core_NativeDB_prepare
    Java_org_sqlite_core_NativeDB__1exec
    Java_org_sqlite_core_NativeDB_errmsg
    Java_org_sqlite_core_NativeDB_libversion
    Java_org_sqlite_core_NativeDB_changes
    Java_org_sqlite_core_NativeDB_total_1changes
    Java_org_sqlite_core_NativeDB_finalize
    Java_org_sqlite_core_NativeDB_step
    Java_org_sqlite_core_NativeDB_reset
    Java_org_sqlite_core_NativeDB_clear_1bindings
    Java_org_sqlite_core_NativeDB_bind_1parameter_1count
    Java_org_sqlite_core_NativeDB_column_1count
    Java_org_sqlite_core_NativeDB_column_1type
    Java_org_sqlite_core_NativeDB_column_1decltype
    Java_org_sqlite_core_NativeDB_column_1table_1name
    Java_org_sqlite_core_NativeDB_column_1name
    Java_org_sqlite_core_NativeDB_column_1text
    Java_org_sqlite_core_NativeDB_column_1blob
    Java_org_sqlite_core_NativeDB_column_1double
    Java_org_sqlite_core_NativeDB_column_1long
    Java_org_sqlite_core_NativeDB_column_1int
    Java_org_sqlite_core_NativeDB_bind_1null
    Java_org_sqlite_core_NativeDB_bind_1int
    Java_org_sqlite_core_NativeDB_bind_1long
    Java_org_sqlite_core_NativeDB_bind_1double
    Java_org_sqlite_core_NativeDB_bind_1text
    Java_org_sqlite_core_NativeDB_bind_1blob
    Java_org_sqlite_core_NativeDB_result_1null
    Java_org_sqlite_core_NativeDB_result_1text
    Java_org_sqlite_core_NativeDB_result_1blob
    Java_org_sqlite_core_NativeDB_result_1double
    Java_org_sqlite_core_NativeDB_result_1long
    Java_org_sqlite_core_NativeDB_result_1int
    Java_org_sqlite_core_NativeDB_value_1text
    Java_org_sqlite_core_NativeDB_value_1blob
    Java_org_sqlite_core_NativeDB_value_1double
    Java_org_sqlite_core_NativeDB_value_1long
    Java_org_sqlite_core_NativeDB_value_1int
    Java_org_sqlite_core_NativeDB_value_1type
    Java_org_sqlite_core_NativeDB_create_1function
    Java_org_sqlite_core_NativeDB_destroy_1function
    Java_org_sqlite_core_NativeDB_free_1functions
    Java_org_sqlite_core_NativeDB_column_1metadata
    Java_org_sqlite_core_NativeDB_backup
    Java_org_sqlite_core_NativeDB_restore
    org/sqlite/core/NativeDB
    src/main/java/org/sqlite/core/NativeDB.c
    Java_org_sqlite_core_NativeDB_column_1metadata
    Java_org_sqlite_core_NativeDB_create_1function
    Java_org_sqlite_core_NativeDB_value_1blob
    Java_org_sqlite_core_NativeDB_result_1blob
    Java_org_sqlite_core_NativeDB_result_1text
    Java_org_sqlite_core_NativeDB_bind_1blob
    Java_org_sqlite_core_NativeDB_column_1blob
    

    Here's the list from the 3.8.7 so:

    aclark@corydoras:0:~/tmp/jdbc$ strings 3.8.7/org/sqlite/native/Linux/i386/libsqlitejdbc.so | grep NativeDB
    org/sqlite/core/NativeDB
    src/main/java/org/sqlite/core/NativeDB.c
    Java_org_sqlite_core_NativeDB_column_1blob
    Java_org_sqlite_core_NativeDB_bind_1blob
    Java_org_sqlite_core_NativeDB_result_1text
    Java_org_sqlite_core_NativeDB_result_1blob
    Java_org_sqlite_core_NativeDB_value_1blob
    Java_org_sqlite_core_NativeDB_create_1function
    Java_org_sqlite_core_NativeDB_column_1metadata
    

    That's a much shorter list and it certainly doesn't include _open.

    Extracting the jars and copying the so from 3.8.6 into the 3.8.7 tree makes the sample run correctly:

    aclark@corydoras:0:~/tmp/jdbc$ java -cp "3.8.6:." Sample
    name = leo
    id = 1
    name = yui
    id = 2
    aclark@corydoras:0:~/tmp/jdbc$ java -cp "3.8.7:." Sample
    Exception in thread "main" java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open(Ljava/lang/String;I)V
            at org.sqlite.core.NativeDB._open(Native Method)
            at org.sqlite.core.DB.open(DB.java:161)
            at org.sqlite.core.CoreConnection.open(CoreConnection.java:145)
            at org.sqlite.core.CoreConnection.<init>(CoreConnection.java:66)
            at org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:21)
            at org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:23)
            at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:45)
            at org.sqlite.JDBC.createConnection(JDBC.java:114)
            at org.sqlite.JDBC.connect(JDBC.java:88)
            at java.sql.DriverManager.getConnection(DriverManager.java:579)
            at java.sql.DriverManager.getConnection(DriverManager.java:243)
            at Sample.main(Sample.java:18)
    aclark@corydoras:1:~/tmp/jdbc$ cp 3.8.6/org/sqlite/native/Linux/i386/libsqlitejdbc.so 3.8.7/org/sqlite/native/Linux/i386/libsqlitejdbc.so 
    aclark@corydoras:0:~/tmp/jdbc$ java -cp "3.8.7:." Sample
    name = leo
    id = 1
    name = yui
    id = 2
    
  3. Mohamad Mohamad

    same issue

    Exception in thread "main" java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open(Ljava/lang/String;I)V
        at org.sqlite.core.NativeDB._open(Native Method)
        at org.sqlite.core.DB.open(DB.java:161)
        at org.sqlite.core.CoreConnection.open(CoreConnection.java:145)
        at org.sqlite.core.CoreConnection.<init>(CoreConnection.java:66)
        at org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:21)
        at org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:23)
        at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:45)
        at org.sqlite.JDBC.createConnection(JDBC.java:114)
        at org.sqlite.JDBC.connect(JDBC.java:88)
        at java.sql.DriverManager.getConnection(DriverManager.java:571)
        at java.sql.DriverManager.getConnection(DriverManager.java:187)
    

    UPDATE: This problem is solved in version 3.8.10.2

  4. Log in to comment