Java - Error JDBC Firebird

 
Vista:

Error JDBC Firebird

Publicado por Fernando Cañete (2 intervenciones) el 27/02/2008 18:23:39
Hola a todos

Soy nuevo en esto de JAVA. he empezado esta semana viendo por encima un poco el lenguaje y me he instalado e NETBEANS 6.01.

Estoy haciendo pruebas para conectarme con una base de datos de FireBird y me he instalado el driver jayrbird, he añadido los ficheros jar creo que donde eran y esta sentencia :

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

Me funciona correctamente pero al llegar aqui:

String databaseURL = "jdbc:firebirdsql:local:c:/gruposp/firebird/databases/CONTRATA.GDB";
String user = "sysdba";
String password = "masterkey";

con = DriverManager.getConnection (databaseURL, user, password);

me mete este leñazo:

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no jaybird21 in java.library.path

y no consigo averiguar porque

¿ Si alguien puede decirme donde tengo que especificar el path de los ficheros jar nuevos ? o algo de esos debe ser

gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Error JDBC Firebird

Publicado por mario.hidalgo (622 intervenciones) el 27/02/2008 19:54:59
Checat esto:

# onfiguring Type 2 JDBC driver
# Type 2 JDBC driver requires JNI library to be installed and available for Java Virtual Machine.
# Precompiled binaries for Windows and Linux platforms are distributed with Jaybird:
# Please note that Jaybird 2.1 provides update to the JNI libraries to support new features. It is
# not compatible with JNI library for Jaybird 2.0.
# ? jaybird21.dll is precompiled binary for Windows platform. Successfully tested with Windows
# 2000 and Windows XP SP1, but there should be no issues also in other Win32 OS.
# Library should be either copied into the directory specified in %PATH% environment variable,
# or made available to JVM using the java.library.path system property.
# ? libjaybird21.so is precompiled binary for Linux platform. It must be available via the
# LD_LIBRARY_PATH environment variable, e.g. copied into /usr/lib/ directory. Another
# possibility is to specify path to the directory with Jaybird JNI library in java.library.path
# system property during the JVM startup.
# ? Other platforms can easily compile the JNI library by checking out the Jaybird sources from the
# CVS and using ?./build.sh compile-native? command in the directory with checked out
# sources.
# After making Jaybird JNI library available to the JVM application has to tell driver to start using
# this by either specifying TYPE2 or LOCAL type in the connection pool or data source properties or
# using appropriate JDBC URL when connecting via java.sql.DriverManager.

En general lo q esta pasando es q esta buscando una DLL por medio de JNI llamada jaybird21.dll esta agregala en el PATH o bien agrega al PATH el directorio de binarios de Jaybird
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Error JDBC Firebird

Publicado por Manuel (1 intervención) el 25/03/2008 21:05:50
Hola! Sabes, yo tambien soy nuevo en esto de Java sin embargo creo que tu problema es porque no tienes direccionada la libreria del conector de Firebird para Java. Utilizas algun IDE como Netbeans o Eclipse? Estos IDEs siempre nos dan la posibilidad de añadir un JAR a nuestro proyecto. Si logras hacer esto seguro que funcionará :)

Suerte y saludos desde Bolivia!!!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Error JDBC Firebird

Publicado por Julian (1 intervención) el 23/04/2008 17:01:57
Tuve problemas al intentar utilizar jaybird (la lib para conectar Firebird con java) en JCreator, pero en eclipse agregue la lib al proyecto e inmediatamente funciono
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar