Xquery w/BDB Could not initialize class com.sleepycat.db.int

Oxygen general issues.
frankmoss
Posts: 5
Joined: Wed Apr 21, 2010 11:15 am

Xquery w/BDB Could not initialize class com.sleepycat.db.int

Post by frankmoss »

Hi,

I am trying to get XQuery with BDB working but when I run the query I get the following error:

Code: Select all


SystemID: /Users/macbookpro/sample.xquery
Engine name: dbxml
Severity: error
Description: Could not instantiate: ro.sync.db.nxd.berkeley.BerkeleySession due to: java.lang.NoClassDefFoundError: Could not initialize class com.sleepycat.db.internal.db_javaJNI
I have configured BDB as it is instructed at oxygen web site.

Mac version: 10.5.8
Java version: 1.6.0_17
Java.runtime.version: 1.6.0_17-b04-248-9M3125
Java.vm.name: Java HotSpot(TM) 64-Bit Server VM
Oxygen version: 11.2 b2010033012
Berkeley DB XML version: 2.5.16
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Xquery w/BDB Could not initialize class com.sleepycat.db.int

Post by adrian »

Hello,

Did you download dbxml-2.5.16.tar.gz, unpack it and successfully built it with 'sh buildall.sh' in the terminal?

The next step is to add the path where the BDB XML native libraries(libdb*.dylib) are located to the environment variable DYLD_LIBRARY_PATH.
e.g.: DYLD_LIBRARY_PATH=/path/to/dbxml-2.5.16/install/lib

There are several ways of setting an environment variable in Mac OS X. You can find a discussion about that here:
http://stackoverflow.com/questions/1356 ... es-in-os-x

Restart the Mac if necessary and start Oxygen again.
To check if the environment variable is available in Oxygen create an External Tool(Tools -> External Tools -> Preferences, New) give it a name and in the 'Command line' field type 'printenv'(without the quotes).
When you execute this external tool you will obtain a list with the environment variables and you can check the value for DYLD_LIBRARY_PATH.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply