no sqlite4java-osx-x86_64 in java.library.path

2,639 views
Skip to first unread message

Frank S. Heath

unread,
Sep 16, 2010, 5:32:04 PM9/16/10
to sqlite4java
I developed a small application using sqlite4java under Netbeans on
Mac OSX. It runs fine in Netbeans but
when I run it from the command line i.e.

java -jar "/Users/fsheathiii/NetBeansProjects/Sqlite_Test/dist/
Sqlite_Test.jar"

I get the following message:

Run Sql test
Sep 16, 2010 2:27:08 PM com.almworks.sqlite4java.Internal log
INFO: [sqlite] DB[1]: instantiated [/tmp/weather.db]
Can not open database(weather.db)
com.almworks.sqlite4java.SQLiteException: [-93] cannot load library:
java.lang.UnsatisfiedLinkError: no sqlite4java-osx-x86_64 in
java.library.path

There is no sqlite4java-osx-x86_64 in the sqlite4java files I
downloaded, nor anywhere else on my
system.

I have tried various -Djava.library.path statements pointed to where
my sqlite4java files are but that
did not help.

Thanks in Advance

Frank

Igor Sereda

unread,
Sep 16, 2010, 5:40:52 PM9/16/10
to sqlite4java
Frank, could you please open terminal, navigate to where
sqlite4java.jar is located and execute:

java -jar sqlite4java.jar -d

and post the result here?

Thanks
Igor

Frank S. Heath

unread,
Sep 17, 2010, 11:34:12 AM9/17/10
to sqlite4java
Igor

bash-3.2$ pwd
/Users/fsheathiii/Java-Source/sqlite4java-201

bash-3.2$ java -jar sqlite4java.jar -d
sqlite4java 201
Sep 17, 2010 8:31:27 AM com.almworks.sqlite4java.Internal log
FINE: [sqlite] Internal: loading library
Sep 17, 2010 8:31:27 AM com.almworks.sqlite4java.Internal log
FINE: [sqlite] Internal: java.library.path=.:/Library/Java/Extensions:/
System/Library/Java/Extensions:/usr/lib/java
Sep 17, 2010 8:31:27 AM com.almworks.sqlite4java.Internal log
FINE: [sqlite] Internal: sqlite4java.library.path=null
Sep 17, 2010 8:31:27 AM com.almworks.sqlite4java.Internal log
FINE: [sqlite] Internal: cwd=/Users/fsheathiii/Java-Source/
sqlite4java-201/.
Sep 17, 2010 8:31:27 AM com.almworks.sqlite4java.Internal log
FINE: [sqlite] Internal: default path=/Users/fsheathiii/Java-Source/
sqlite4java-201
Sep 17, 2010 8:31:27 AM com.almworks.sqlite4java.Internal log
FINE: [sqlite] Internal: forced path=null
Sep 17, 2010 8:31:27 AM com.almworks.sqlite4java.Internal log
FINE: [sqlite] Internal: os.name=mac os x; os=osx
Sep 17, 2010 8:31:27 AM com.almworks.sqlite4java.Internal log
FINE: [sqlite] Internal: os.arch=x86_64
Sep 17, 2010 8:31:27 AM com.almworks.sqlite4java.Internal log
FINE: [sqlite] Internal: trying to load sqlite4java-osx-x86_64
Sep 17, 2010 8:31:27 AM com.almworks.sqlite4java.Internal log
FINE: [sqlite] Internal: cannot load sqlite4java-osx-x86_64:
java.lang.UnsatisfiedLinkError: no sqlite4java-osx-x86_64 in
java.library.path
Sep 17, 2010 8:31:27 AM com.almworks.sqlite4java.Internal log
FINE: [sqlite] Internal: trying to load sqlite4java-osx-amd64
Sep 17, 2010 8:31:27 AM com.almworks.sqlite4java.Internal log
FINE: [sqlite] Internal: cannot load sqlite4java-osx-amd64:
java.lang.UnsatisfiedLinkError: no sqlite4java-osx-amd64 in
java.library.path
Sep 17, 2010 8:31:27 AM com.almworks.sqlite4java.Internal log
FINE: [sqlite] Internal: trying to load sqlite4java-osx-10.4 from /
Users/fsheathiii/Java-Source/sqlite4java-201/libsqlite4java-
osx-10.4.jnilib
Sep 17, 2010 8:31:27 AM com.almworks.sqlite4java.Internal log
INFO: [sqlite] Internal: loaded sqlite4java-osx-10.4 from /Users/
fsheathiii/Java-Source/sqlite4java-201/libsqlite4java-osx-10.4.jnilib
Sep 17, 2010 8:31:27 AM com.almworks.sqlite4java.Internal log
INFO: [sqlite] Internal: loaded sqlite 3.6.23.1, wrapper 0.2
SQLite 3.6.23.1
Compile-time options: ENABLE_COLUMN_METADATA ENABLE_FTS3
ENABLE_FTS3_PARENTHESIS ENABLE_LOCKING_STYLE=0
ENABLE_MEMORY_MANAGEMENT ENABLE_STAT2 OMIT_DEPRECATED
OMIT_LOAD_EXTENSION TEMP_STORE=1 THREADSAFE=1



bash-3.2$ uname -a
Darwin frank-heaths-macbook.local 10.4.0 Darwin Kernel Version 10.4.0:
Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386

Thanks for the reply, I hope this helps.

Frank

Igor Sereda

unread,
Sep 17, 2010, 3:17:02 PM9/17/10
to sqlite4java
Hmm, well, as you can see, it successfully loads libsqlite4java-
osx-10.4.jnilib. Make sure this file is located in the same directory
with sqlite4java.jar when you start your application. If it doesn't
work, you can try setting sqlite4java.library.path system property to
the directory where .jnilib is located, before the first call to
sqlite4java methods.

Hope this helps!
Igor

Frank S. Heath

unread,
Sep 17, 2010, 7:24:01 PM9/17/10
to sqlite4java
Igor

Is this what you mean?

java -Dsqlite4java.library.path=/Users/fsheathiii/Java-Source/
sqlite4java/ -jar "/Users/fsheathiii/NetBeansProjects/DesktopWeather/
dist/DesktopWeather.jar" -d

Thanks

Frank

Frank S. Heath

unread,
Sep 18, 2010, 6:16:00 PM9/18/10
to sqlite4java
Duh! I fixed it. Two typos in the Library path statement had me
chasing my tail.

It works great now. Thanks for the time.

Frank
Reply all
Reply to author
Forward
0 new messages