views:

16

answers:

0

I'm writing a small java program that can read a .GDB file using the embedded Firebird server (libfbembed.so) on linux.

I have all my paths correct: my classpath provides the Firebird classes, and my java library path provides the jaybird library.

My connection string is:

private String connectionString = "jdbc:firebirdsql:embedded:/home/symen/data.gdb";

I register the driver with:

Class.forName("org.firebirdsql.jdbc.FBDriver").newInstance();

Then I get the driver object by:

d = java.sql.DriverManager.getDriver (this.connectionString);

Next I try to get the connection into an object:

c = java.sql.DriverManager.getConnection (this.connectionString);

This fails and gives me a runtime error:

org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544373. operating system directive open failed

I made sure the gdb file and the folder it is in have proper permissions. Right now it's even 777 for both.

Edit: I am using Jaybird2.1 here. The DriverManager.getDriver returns the driver which is 'Firebird JCA-JDBC driver version 2.0'. Could this contribute to the problem?

Edit: I tried adding myself as a user to the 'firebird' group. Didn't help.

Edit: I am now using the jaybird-full-2.1.6.jar classes. Still no help.

Edit: Tried moving the database file to /var/tmp. Did not help.

Edit: Downloaded the JCA-JDBC driver again and added the path to the unzipped contents to my classpath. To no avail. The latest JCA-JDBC can probably already be found in the default classpath.

Am I missing something obvious here?