Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Berkley DB XML 2.4 on Mac OS 10.5

632857Apr 9 2008 — edited Jun 5 2009
Hi,

I am evaluating the Berkley DB XML to use in our project. Compiling of the DB XML was successful, but during runtime (instantiating the XmlManager) I got this error message:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /Users/hvtranho/dbxml-2.4.11/install/lib/libdbxml_java-2.4.jnilib:
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1822)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1739)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:993)
at com.sleepycat.dbxml.dbxml_javaJNI.<clinit>(dbxml_javaJNI.java:49)
at com.sleepycat.dbxml.XmlManager.<init>(XmlManager.java:56)
...

can you please help?

thanks in advance

hvtranho.

Comments

632857
P.S.: I am using jdk 1.5.0_13, Mac OS 10.5.2.
Gmfeinberg-Oracle
Hi,

The first thing to check is if you are setting DYLD_LIBRARY_PATH in your environment. Are you trying to run the examples? E.g. basic.HelloWorld?

Regards,
George
632857
Hi George,

I tried to run the example HelloWorld with this VM parameter:

-Djava.library.path=/Users/hvtranho/dbxml-2.4.11/install/lib

I got the same error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /Users/hvtranho/dbxml-2.4.11/install/lib/libdbxml_java-2.4.jnilib:
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1822)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1739)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:993)
at com.sleepycat.dbxml.dbxml_javaJNI.<clinit>(dbxml_javaJNI.java:49)
at com.sleepycat.dbxml.XmlManager.<init>(XmlManager.java:96)
at com.sleepycat.dbxml.XmlManager.<init>(XmlManager.java:102)
at com.mytest.app.HelloWorld.main(HelloWorld.java:41)

Best Regards,
hvtranho.
Gmfeinberg-Oracle
hvtranho,

I don't think that using java.library.path alone is sufficient. Try setting DYLD_LIBRARY_PATH.

Regards,
George
632857
Hi George,

after setting that env variable:

export DYLD_LIBRARY_PATH=/Users/hvtranho/dbxml-2.4.11/install/lib

and restart my Mac, check again, run the app: I got the same error.

Thanks,
Hoan.
632857
Hi George,

only for info: If I switch to the old version of the DB (2.3.10), the HelloWorld run through.

Best Regards,
Hoan.
Gmfeinberg-Oracle
Hoan,

2.4 has been run on OS X 10.5. Are you sure your build was successful? Can you run C++ examples?

Regards,
George
Gmfeinberg-Oracle
Hoan,

One difference in Java from 2.3.10 to 2.4.x is adding explicit -source and -target directives to javac. I have no idea why that'd be a problem for you but it can't hurt to remove them - edit dbxml/build_unix/Makefile.defs and take them out of JAVACFLAGS

Then from that same directory, type:
rm dbxml.jar
make java
make install

You should see the javac happen in the first make.

Regards,
George
632857
Hi George,

thanks a lot, it works after I did following your instruction.

Best Regards,
Hoan.
705311
Dear George,

Thanks for this post. I had the same problem as Hoan's one.

However, according to your post, it works fine for me by doing a "make clean" between "rm dbxml.jar" and "make java".

Best regards,

Sébastien.
1 - 10
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 3 2009
Added on Apr 9 2008
10 comments
3,935 views