dbTalk Databases Forums  

UnsatisfiedLinkError (again ?)

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss UnsatisfiedLinkError (again ?) in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Milo
 
Posts: n/a

Default UnsatisfiedLinkError (again ?) - 02-12-2005 , 04:42 PM







Hi all,

The last couple of days i have been trying to get a sample of the
sleepycat xml database to work.
Unfortunately, running the example keeps throwing a
UnsatisfiedLinkError at me. Solutions in old message threads
addressing the same issue did not solve this problem.

SuSE linux 9.1 for amd64 runs on my machine with a 2.6.5 kernel. I
practiced the same routine on a SuSE 9.1 Pentium IV machine with
exactly the same result. Tried Java versions 1.4.2 and 1.5.0.

build dir: /root/tmp/dbxml-2.0.9
deploy dir: /opt/bdbxml-2.0.9

- building xml db: ./buildall.sh -b 64 --enable-java
- moved files from builddir/install to deploydir/
- added deploydir/lib to /etc/ld.so.conf
- ran ldconfig
- ran ldconfig -p | grep dbxml. result was
libxquery-1.0.so (libc6,x86-64) =>
/opt/bdbxml-2.0.9/lib/libxquery-1.0.so
libxerces-c.so.26 (libc6,x86-64) =>
/opt/bdbxml-2.0.9/lib/libxerces-c.so.26
libxerces-c.so (libc6,x86-64) =>
/opt/bdbxml-2.0.9/lib/libxerces-c.so
libpathan.so.3 (libc6,x86-64) =>
/opt/bdbxml-2.0.9/lib/libpathan.so.3
libpathan.so (libc6,x86-64) =>
/opt/bdbxml-2.0.9/lib/libpathan.so
libdbxml_java-2.0.so (libc6,x86-64) =>
/opt/bdbxml-2.0.9/lib/libdbxml_java-2.0.so
libdbxml-2.0.so (libc6,x86-64) =>
/opt/bdbxml-2.0.9/lib/libdbxml-2.0.so
libdb_java-4.3.so (libc6,x86-64) =>
/opt/bdbxml-2.0.9/lib/libdb_java-4.3.so
libdb_cxx-4.3.so (libc6,x86-64) =>
/opt/bdbxml-2.0.9/lib/libdb_cxx-4.3.so
libdb-4.3.so (libc6,x86-64) =>
/opt/bdbxml-2.0.9/lib/libdb-4.3.so

- set CLASSPATH to
/opt/bdbxml-2.0.9/lib/db.jar:/opt/bdbxml-2.0.9/lib/dbxml.jar:/opt/bdbxml-2.0.9/lib/dbxmlexamples.jar
- set LD_LIBRARY_PATH to /opt/bdbxml-2.0.9/lib
- created a default container using dbxml_shell /opt/bdbxml-2.0.9/db

- ran an example:
java com.sleepycat.dbxml.examples.gettingStarted.exampl eLoadContainer
-h /opt/bdbxml-2.0.9/db -p /opt/bdbxml-2.0.9/examples/xmlData/
Exception in thread "main" java.lang.UnsatisfiedLinkError:
/opt/bdbxml-2.0.9/lib/libdb_java-4.3.so:
/opt/bdbxml-2.0.9/lib/libdb_java-4.3.so: cannot open shared object
file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.jav a:1560)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1485)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at
com.sleepycat.db.internal.db_javaJNI.<clinit>(db_j avaJNI.java:48)
at com.sleepycat.db.internal.DbEnv.<init>(DbEnv.java: 191)
at
com.sleepycat.db.EnvironmentConfig.createEnvironme nt(EnvironmentConfig.java:738)
at
com.sleepycat.db.EnvironmentConfig.openEnvironment (EnvironmentConfig.java:691)
at com.sleepycat.db.Environment.<init>(Environment.ja va:30)
at
com.sleepycat.dbxml.examples.gettingStarted.exampl eLoadContainer.createEnv(exampleLoadContainer.java :147)
at
com.sleepycat.dbxml.examples.gettingStarted.exampl eLoadContainer.loadXmlFiles(exampleLoadContainer.j ava:160)
at
com.sleepycat.dbxml.examples.gettingStarted.exampl eLoadContainer.main(exampleLoadContainer.java:79)

At this point i am at a loss. Why does it complain about a missing lib,
even it is acually there?

Any help is appreciated
Milo


Reply With Quote
  #2  
Old   
Michael Cahill
 
Posts: n/a

Default Re: UnsatisfiedLinkError (again ?) - 02-15-2005 , 05:24 PM






Hi Milo,

Quote:
/opt/bdbxml-2.0.9/lib/libdb_java-4.3.so:
/opt/bdbxml-2.0.9/lib/libdb_java-4.3.so: cannot open shared object
file: No such file or directory
Can you try this?

ldd /opt/bdbxml-2.0.9/lib/libdb_java-4.3.so

I'm not sure why this is failing, but it may be because you moved the
files from the installation directory by hand. It's usually simpler to
set the installation directory with '--prefix=...' when you run the
buildall.sh script.

Regards,
Michael.



Reply With Quote
  #3  
Old   
Milo
 
Posts: n/a

Default Re: UnsatisfiedLinkError (again ?) - 02-16-2005 , 07:21 AM



Hello Michael,

Thanks for your response.
Just made a clean build and install using the buildall script with a
--prefix parameter setting, as you suggested.
The result is the same. Running an example ends up with the same
exception.

output ldd /opt/bdbxml-2.0.9/lib/libdb_java-4.3.so:

libpthread.so.0 => /lib64/tls/libpthread.so.0 (0x0000002a95768000)
libc.so.6 => /lib64/tls/libc.so.6 (0x0000002a9587d000)
/lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
(0x000000552aaaa000)

If you are interested in the logfiles of the latest build, I can send
them to you.

Kind regards
Milo

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.