This discussion is archived
1 Reply Latest reply: Jan 21, 2013 6:07 AM by 981119 RSS

Problems loading Berkeley (db5) on Centos 32 bits

981119 Newbie
Currently Being Moderated
Hi everyone !!!

The main problem is that CentOS have, by default, db4 in his repository but I need db5, to resolve this issue I have installed and compiled Berkeley 5.3.21 on Linux CentOS with the follow steps:

I accessed to build_unix and made ../dist/configure & make & make install

Now in this point I tried to run a app java through this command: # java -Djava.library.path=/usr/local/BerkeleyDB.5.3/lib -jar appdb.jar
which -Djava.library.path=/usr/local/BerkeleyDB.5.3/lib is the path where is installed BerkeleyDB 5 and appdb.jar is the app in java

BUT I have the follow error:
Caused by: java.lang.UnsatisfiedLinkError: no db_java-5.3 in java.library.path
at java.lang.ClassLoader.loadLibrary(
at java.lang.Runtime.loadLibrary0(
at java.lang.System.loadLibrary(
at com.sleepycat.db.internal.db_javaJNI.<clinit>(
at com.sleepycat.db.internal.DbEnv.<init>(
at com.sleepycat.db.EnvironmentConfig.createEnvironment(
at com.sleepycat.db.EnvironmentConfig.openEnvironment(
at com.sleepycat.db.Environment.<init>(

I put the db-5.3.21.jar in Javahome/jre/lib/ext and the results were same
I tried to install by console the db5 .rpm but is a mess

What can I do??? I hope your feed back, thank you in advance, sorry for my english
  • 1. Re: Problems loading Berkeley (db5) on Centos 32 bits
    981119 Newbie
    Currently Being Moderated

    Finally my question has been solved I noticed a mistake in the installation.
    All steps to install Berkeley DB on CentOS are descriptive next:

    Download from Oracle link

    Access to build_unix file

    NOW !!! Compiling BerkeleyDB I should put options "--prefix=/usr/local" to describe path of instalation and "--enable-java" to enable java and create libdb_java libraries, in the end ypu should have a command like this
    ../dist/configure --prefix=/usr/local

    (More information

    Make a Symbolic link from lib/ext to BerkeleyDB file install, for instance:
    # ln -n /JREHOME/lib/ext/db.jar BERKELEYINSTALLFILE/db.jar

    Congratulation for myself, YEP!!!!


  • Correct Answers - 10 points
  • Helpful Answers - 5 points