IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JDBC Java Discussion :

[erreur]No Jaybird in Java.library.path


Sujet :

JDBC Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre chevronné Avatar de bassim
    Homme Profil pro
    Ingénieur Réseaux
    Inscrit en
    Février 2005
    Messages
    666
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Ingénieur Réseaux
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Février 2005
    Messages : 666
    Par défaut [erreur]No Jaybird in Java.library.path
    j'ai cette erreur qui survient dans l'application , pourtant j'ai les fichiers :
    FirebirdSql ,
    Jaas
    ....
    dans Java/Lib/Ext

    alors je vois pas le probleme , en fait ça marchait normalement avant jusqu'au moment ou j'ai décidé de passer a la version Embeded de Firebird donc j'ai du changer
    le repertoire pour me connecter à la base ...

    avant j'utilisais une version lient/serveur

  2. #2
    Rédacteur
    Avatar de eclesia
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    2 109
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2006
    Messages : 2 109
    Par défaut
    détail s'il te plait, met l'erreur que ca te renvoit, le morceau qui genere l'erreur... etc... bref le minimum pour t'aider

  3. #3
    Membre chevronné Avatar de bassim
    Homme Profil pro
    Ingénieur Réseaux
    Inscrit en
    Février 2005
    Messages
    666
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Ingénieur Réseaux
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Février 2005
    Messages : 666
    Par défaut
    ok , désolé pour mon imprécision ,

    voici la partie de code qui me permet de me connecter à la base Firebird :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
     
    private void InitBD()
    	{
    	try {
    		Class.forName(driverName).newInstance();
     
    		Variables.connection = DriverManager.getConnection(UrlDataBase, user,  password); // l''erreur est ici
     
    		Variables.stat = Variables.connection.createStatement(
    					ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
     
    		Variables.connection.setAutoCommit(true);
     
    		} 
    		catch (SQLException e) {System.exit(0);}
    		catch (InstantiationException e) {System.exit(0);}
    		catch (IllegalAccessException e) {System.exit(0);}
    		catch (ClassNotFoundException e) {System.exit(0);}
    		catch (Exception e){ System.exit(0);}
     
    	}
     
    private String UrlDataBase="jdbc:firebirdsql:local:C:\\Optica\\Optica.fdb";
    private String user = "sysdba";
    private String password = "masterkey";	
    private String driverName = "org.firebirdsql.jdbc.FBDriver";
    et voici l'erreur :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
     
    Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no jaybird in java.library.path
    	at java.lang.ClassLoader.loadLibrary(Unknown Source)
    	at java.lang.Runtime.loadLibrary0(Unknown Source)
    	at java.lang.System.loadLibrary(Unknown Source)
    	at org.firebirdsql.ngds.GDS_Impl.<init>(GDS_Impl.java:59)
    	at org.firebirdsql.gds.GDSFactory.createGDSForType(GDSFactory.java:63)
    	at org.firebirdsql.gds.GDSFactory.getGDSForType(GDSFactory.java:48)
    	at org.firebirdsql.jca.FBManagedConnectionFactory.<init>(FBManagedConnectionFactory.java:127)
    	at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:121)
    	at java.sql.DriverManager.getConnection(Unknown Source)
    	at java.sql.DriverManager.getConnection(Unknown Source)
    	at pkgFichePrincipale.FicheP.InitBD(FicheP.java:407)
    	at pkgFichePrincipale.FicheP.<init>(FicheP.java:58)
    	at FichePrincipale$1.run(FichePrincipale.java:12)
    	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    	at java.awt.EventQueue.dispatchEvent(Unknown Source)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    	at java.awt.EventDispatchThread.run(Unknown Source)
    au début j'utilisait la version Firebird Client /serveur ,
    et depuis que j'ai voulu changer pour la version Embeded afin de déployer mon application sur un seul poste , j'ai cette erreur .

    Edit :le dossier Jre1.6/Lib/Ext contient bien les fichiers (relatifs au pilote Jaybird) : FirebirdSql (Jdk1.4 , sinon ça na pas marché pour Jaybird 2.0)
    jaas.jar , mini_J2EE.jar

    Edit2: j'ajoute que mon repertoire c:/Optica contient ces differents fichiers
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
     
    c:/Optica/Optica.jar
    c:/Optica/Optica.Fdb
    c:/Optica/FbEmbeded.dll
    c:/Optica/ib_Util.dll
    c:/Optica/icu*.dll // pour Firebird 2.0
    c:/Optica/Firebird.conf // là le RootDirectory = c:/Optica/

  4. #4
    Membre chevronné Avatar de bassim
    Homme Profil pro
    Ingénieur Réseaux
    Inscrit en
    Février 2005
    Messages
    666
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Ingénieur Réseaux
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Février 2005
    Messages : 666
    Par défaut
    voilà , j'ai fait mes recherches , et j'ai trouvé qu'avec la version Embeded de Firebird , il faut que le fichier jaybird2.dll soit accéssible à la JVM , donc il faut que je definisse le java.library.path
    comme c'est dis ici:
    Configuring type 2 driver

    Type 2 JDBC driver requires following components to be installed on the client computer:

    *
    Firebird client (fbclient.dll and corresponding files and registry entries);
    *
    JayBird JNI library, jaybird2.dll on Windows and libjaybird2.so on Linux.

    JayBird JNI library should be accessible to JVM. This means that it must be either located in path(%PATH% on Windows or $PATH on Linux) or the directory where the library is located must be specified in java.library.path startup property of the JVM. Firebird client library should be accessible through PATH environment variable (java.library.path is not taken into the account).
    mais je sais pas comment faire , si quelqu'un peut m'aider

  5. #5
    Rédacteur
    Avatar de eclesia
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    2 109
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2006
    Messages : 2 109
    Par défaut
    essaye de mettre les .dll dans le dossier :
    jre/lib/i386

  6. #6
    Membre chevronné Avatar de bassim
    Homme Profil pro
    Ingénieur Réseaux
    Inscrit en
    Février 2005
    Messages
    666
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Ingénieur Réseaux
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Février 2005
    Messages : 666
    Par défaut
    2 jours que je m'arrache les cheveux pour une erreur bête ,
    en fait j'avais mélangé les fichiers de la version Embeded avec ceux de la version Serveur .

    merci de votre aide , le sujet est résolu

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 13
    Dernier message: 28/12/2010, 17h14
  2. [JDIC] no jdic in java.library.path
    Par michaeljeru dans le forum AWT/Swing
    Réponses: 5
    Dernier message: 22/04/2007, 14h18
  3. [Java3D] no j3dcore-ogl in java.library.path
    Par nonolerobot77 dans le forum 3D
    Réponses: 3
    Dernier message: 27/03/2007, 18h23
  4. [erreur]no Jaybird in Java.library.path
    Par bassim dans le forum Connexion aux bases de données
    Réponses: 3
    Dernier message: 29/12/2006, 14h37
  5. [JNI] modification de java.library.path
    Par alex'l dans le forum Entrée/Sortie
    Réponses: 1
    Dernier message: 08/09/2006, 13h45

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo