Berkeley DB XML in non-standard library location OS X

Oxygen general issues.
msqr
Posts: 15
Joined: Thu May 19, 2005 8:19 pm

Berkeley DB XML in non-standard library location OS X

Post by msqr »

I have compiled Berkeley DB XML on OS X and installed the libraries in /usr/local/bdb/lib. I followed the instructions at http://www.oxygenxml.com/berkeley.html for configuring Berkeley DB in Oxygen (including modifying the Info.plist with the -Djava.library.path), but get the following error when trying to execute an XQuery with Berkeley DB:

E /usr/local/bdb/lib/libdbxml_java-2.2.jnilib:

I have seen this type of error when using other java apps that don't have the DYLD_LIBRARY_PATH environment set, but I do have DYLD_LIBRARY_PATH defined for my shell. I don't think Oxygen uses this this value when launched by double-clicking the Oxygen icon, however. If I use a shell to open Oxygen like this:

open /Applications/oxygen/Oxygen.app

and then try to use Berkeley DB XML, it works.

My question is then, is there any way to get this to work without the DYLD_LIBRARY_PATH environment variable, or is there some way to define this for Oxygen when it is launched by double-clicking on it's icon?
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

On some Mac computers the java.library.path set in Info.plist does not work. So when <oXygen/> is started by a double click on the application icon the DYLD_LIBRARY_PATH variable must be set also in the ~/.MacOSX/environment.plist file. In your case the environment.plist file is:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DYLD_LIBRARY_PATH</key>
<string>/usr/local/bdb/lib</string>
</dict>
</plist>
Regards,
Sorin
msqr
Posts: 15
Joined: Thu May 19, 2005 8:19 pm

Post by msqr »

Thanks very much, that did the trick!

-- m@
Post Reply