Subject failed to initialize jaybird native library / firebird client library
Author judlian23
Hi all (or just Roman, it seems),
I successfully got firebird running on Windows, and now I must get it
running on LINUX as an EMBEDDED db from within my java program using
JAYBIRD.

I have followed the steps here
http://www.firebirdfaq.org/Firebird-Embedded-Linux-HOWTO.html to setup
the embedded db. I also installed jaybird by adding the
jaybird-full-2.1.6.jar to my classpath as well as adding
libjaybird21.so to my LD_LIBRARY_PATH.

When I execute the code below, I get the error shown below.

public static void main(String[] args)
{
Main myMain = new Main();
myMain.loadDriver();
myMain.createDatabase();
}

private void loadDriver() {
try {
Class.forName("org.firebirdsql.jdbc.FBDriver");
} catch (ClassNotFoundException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE,
"Could not load driver '" + driverClass + "'", ex);
closeDBConnectionAndExit();
}
}

private void createDatabase() {
FBManager manager = new FBManager("EMBEDDED");
try {
manager.start();
manager.createDatabase("~/dbtesting/data/DB.FDB",
"SYSDBA", "masterkey");
manager.stop();
System.err.println("Create DB finished");
} catch (Exception ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE,
null, ex);
}
}

Nov 4, 2008 2:28:49 PM Main createDatabase
SEVERE: null
java.lang.RuntimeException: Failed to initilize Jaybird native
library. This is most likley due to a failure to load the firebird
client library.
at
org.firebirdsql.gds.impl.jni.JniGDSImpl.attemptToLoadAClientLibraryFromList(JniGDSImpl.java:100)
at
org.firebirdsql.gds.impl.jni.EmbeddedGDSImpl.<init>(EmbeddedGDSImpl.java:31)
at
org.firebirdsql.gds.impl.jni.EmbeddedGDSImpl.<init>(EmbeddedGDSImpl.java:21)
at
org.firebirdsql.gds.impl.jni.EmbeddedGDSFactoryPlugin.getGDS(EmbeddedGDSFactoryPlugin.java:40)
at
org.firebirdsql.gds.impl.GDSFactory.getGDSForType(GDSFactory.java:219)
at org.firebirdsql.management.FBManager.start(FBManager.java:98)
at Main.createDatabase(Main.java:45)
at Main.main(Main.java:231)

Anyone know what to do or how to go about fixing this?

Please help.

Julian