SQLite support for java

I am running openHAB3.0 (an home automation platform written in java 11) and configured persistence trough SQLite.
I am getting this exception:
java.lang.Exception: No native library is found for os.name=Linux and os.arch=aarch64. path=/org/sqlite/native/Linux/aarch64.
I am running this from a RockPro64 SBC in latest manjaro. All packages are up-to-date.
Currently I am running java from jre11-openjdk, but I also tried other java11 packages with no luck.
I also installed java-sqlite-jdbc but again I had no luck.
sqlite is installed of course.
So my question is: is SQLite supported in aarch64?


It should be, since the package is in the repo and it’s getting built according to the PKGBUILD.

Not sure what causes your issue. :frowning:

What kind of information can I provide to help further investigate the problem?
Also, the error is probably in the java binding as I also use SQLite in php and it works perfectly.

No idea really. I don’t use either of them. :frowning:

Hummm, do I need to submit a bug in the upstream java binding package?

I may be wrong but don’t you need a sqlite-jdbc in addition to sqlite ?
Some like java-sqlite-jdbc (aarch64) | Packages | Arch Linux ARM ?

Already did it. Unfortunately it didn’t work. I can’t remember if I restarted the system after installing it, but I doubt it would make a difference.

sorry my bad, I didn’t read so carefully.
I guess you maybe should at least logout and login to be sure that all PATH variables (LIB and standard one) are updated for your session.

Your app is looking for things in /org/sqlite/native/Linux/aarch64. Do you have any environment path that include this path ?

what is the result of this following command :

env | egrep -i ‘path|lib’

Were are the java-sqlite-jdbc files located ?

pamac list -f java-sqlite-jdbc

Maybe a link is corrupt or dead ?

I don’t, but I think that path is relative to java classpath, not to filesystem. I never saw an org folder in root /. :thinking:


Can you see anything wrong?

Unfortunately, I can’t. :frowning:

According to the github :

Our SQLiteJDBC library requires no configuration since native libraries for major OSs, including Windows, Mac OS X, Linux etc., are assembled into a single JAR (Java Archive) file. The usage is quite simple; download our sqlite-jdbc library, then append the library (JAR file) to your class path.

Maybe you can add /usr/share/java/sqlite-jdbc to your PATH or CLASSPATH ?

cf. PATH and CLASSPATH (The Java™ Tutorials > Essential Classes > The Platform Environment)

Sorry for the late answer, I was not sure how to add a jar to openhab classpath as it uses karaf and osgi which I am not expert at.
However, I was able to add it and it works. I will open a ticket to openhab and ask to update documentation.
Thanks @Dulbi, your help was very much appreciated!!

You’re welcome !

I don’t know what openhab, karaf and osgi are but my my recommendation was to set it globally (or only on the current profile) and not only in your apps.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.