Subject Re: [Firebird-Java] get UnavailableDatabaseFileException when accessing to multiuser database
Author Roman Rokytskyy
> I have problem with connecting *.gdb with java. I've downloaded Firebird
> Interclient 2.01 from www.ibphoenix.com.

Strange... the thing is that InterClient is not supported by us - it is not
"Firebird InterClient" but "Borland InterClient" and very likely is not
compatible with new versions of Firebird. We have our own driver called
Jaybird, which comes in two flavours - type 4 and type 2. Strange that
IBPhoenix advertises InterClient on their site. Can you provide a URL where
you have downloaded it?

> I've tried to solve this problem by connect with another port, but I don't
> know how...
> If I use jdbc:interbase://server-neo:3051/e:/data/data.gdb, the server
> didn't response until timeout. I use JRE v. 1.5.

The architecture is a bit different. Your Java component should connect to
port 3060 by default, it is the port where InterServer listens for incoming
connections. You should not start another InterServer instance on the same
node. Internally, it connects to the database using IPC, therefore ít has to
run on the same host with InterBase/Firebird. As to the "error while trying
to open file"... I guess something is wrong with InterServer where it tries
to access database file (I guess it has something to do with exclusive locks
on the file).

I'd suggest to switch to Jaybird, some documentation you can get at
http://jaybirdwiki.firebirdsql.org For starter:

a) add jaybird-full-2.0.1.jar to your classpath
b) use driver class name "org.firebirdsql.jdbc.FBDriver"
c) use JDBC URL "jdbc:firebirdsql:<host/port>:/path/to/database" (e.g.
"jdbc:firebirdsql:server-neo/3050:e:/data/data.gdb")

Hope this helps.

Roman