Subject Re: [Firebird-Java] java.library.path
Author Mark Rotteveel
Pruteanu Dragos wrote:
> I use Firebird 2.1.2 with Jaybird-2.1.6JDK_1.5
>
> I set no other connection properties than user and password.
>
> URL:
> jdbc:firebirdsql:local:C:\Program Files\Firebird\Firebird_2_1\examples\empbuild\EMPLOYEE.FDB

> The issue with local is strange, since is not user intuitive. Everybody knows localhost, and what I need is to connect to the database.
> I tell the driver that the target machine is localhost and I want to connect. There is no need for the user to understand how the connection works.

Jaybird has several drivers:
pure Java (type 4): jdbc:firebirdsql://<host>:<port>/<db-path> and
(old-style) jdbc:firebirdsql:<host>/<port>:<db-path>
native/JNI (type 2): jdbc:firebirdsql:native:<host>/<port>:<db-path>
local/JNI (type 2): jdbc:firebirdsql:local:<db-path>
embedded/JNI (type 2): jdbc:firebirdsql:embedded:<db-path>

You are currently using the local protocol which requires some
additional setup and you do NOT specify the hostname, but the driver-type.

I agree that an end-user of your application should not know the
specifics of a connection, but as a developer you do need to be aware of
driver specifics and deployment, especially since every JDBC driver out
there has its own quirks and deployment details.
If you deploy/use a type 2 driver like you are currently doing with that
URL, than be prepared to know how you should run your application so it
can load the external library.

Personally I think it be easier to find out why the connection fails
using the pure java driver. I would look into what is reported in
JDBC-101 that I mailed earlier.

--
Mark Rotteveel