-
Notifications
You must be signed in to change notification settings - Fork 619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnsatisfiedLinkError with SQLite JDBC Driver Using System libsqlite3.so on Linux and other OSs #1179
Comments
that can't work, because of this:
This is how JNI works, you need a specifically compiled library containing the JNI code. You can check how to compile against your own version of sqlite here: sqlite-jdbc/.github/workflows/ci.yml Lines 161 to 181 in 02bac1a
|
Then, what is the purpose of: |
to use the binaries you have compiled yourself, for example for architectures that we don't ship in the jar, or if you build against your own amalgamation (as in the workflow i linked above). Or to use a specific version of SQLite that you could have extracted from a previous version of the sqlite-jdbc jar. |
Describe the bug
When using the SQLite JDBC driver with the system-installed libsqlite3.so on both Linux and OpenIndiana platforms (and presumably others), the Java application fails with an UnsatisfiedLinkError. The driver cannot find the required JNI method implementations in the system's SQLite library.
To Reproduce
Install the SQLite JDBC driver (e.g., sqlite-jdbc-3.46.1.0.jar).
Ensure that the system's libsqlite3.so is present in /usr/lib64.
Run the Java application with the following JVM options:
Expected behavior
The application should successfully establish a connection to the SQLite database using the system-installed libsqlite3.so without any errors.
Logs
Environment (please complete the following information):
Additional context
The system libsqlite3.so lacks the JNI bindings required by the SQLite JDBC driver.
This issue occurs when attempting to use the system-installed SQLite library instead of the native library bundled within the driver JAR.
The problem is consistent across both Linux and OpenIndiana platforms.
Is there a way to configure the driver to work with the system libsqlite3.so without rebuilding the driver or creating custom JNI libraries?
Allowing the driver to use the system's SQLite library would enhance compatibility and simplify deployment.
The text was updated successfully, but these errors were encountered: