begin process at 2012 02 15 16:29:44
  Trouver un code source :
 
dans
 
Accueil > Forum > 

Archive Java

 > 

Archives

 > 

JDBC

 > 

connection java avec bd mysql


Derniers messages déposésPoser une question dans le forum ou lancer une discussion

connection java avec bd mysql

mercredi 23 mars 2005 à 23:40:17 | connection java avec bd mysql

shumi5

Bonjour à tous,
je suis en 4éme année école d'ing.
je travaille sur le deboggage d'un projet (java,bd mysql).L'application java est déjà faite.

L'application java est censée créer une bd et se connecter à cette base.
Mais en lançant cette application il me dit que la communication entre java et la bd mysql a échoué et il  m'affiche  ce message:

SQLException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.UnknownHostException

MESSAGE: null: null

STACKTRACE:

java.net.UnknownHostException: null: null

at java.net.InetAddress.getAllByName0(Unknown Source)

at java.net.InetAddress.getAllByName0(Unknown Source)

at java.net.InetAddress.getAllByName(Unknown Source)

at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:133)

at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:280)

at com.mysql.jdbc.Connection.createNewIO(Connection.java:1765)

at com.mysql.jdbc.Connection.<init>(Connection.java:430)

at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:268)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at horsligne.util.BDmysql.creerBD(BDmysql.java:36)

at horsligne.util.BDGenerale.<init>(BDGenerale.java:25)

at horsligne.ui.NouveauProjetUi.actionPerformed(NouveauProjetUi.java:209)

at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.setPressed(Unknown Source)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)

at java.awt.Component.processMouseEvent(Unknown Source)

at javax.swing.JComponent.processMouseEvent(Unknown Source)

at java.awt.Component.processEvent(Unknown Source)

at java.awt.Container.processEvent(Unknown Source)

at java.awt.Component.dispatchEventImpl(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)

at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)

at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Window.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(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)

 

** END NESTED EXCEPTION **

 

SQLState: 08S01

VendorError: 0

SQLException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.UnknownHostException

MESSAGE: null

STACKTRACE:

java.net.UnknownHostException: null

at java.net.InetAddress.getAllByName0(Unknown Source)

at java.net.InetAddress.getAllByName0(Unknown Source)

at java.net.InetAddress.getAllByName(Unknown Source)

at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:133)

at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:280)

at com.mysql.jdbc.Connection.createNewIO(Connection.java:1765)

at com.mysql.jdbc.Connection.<init>(Connection.java:430)

at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:268)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at horsligne.util.BDmysql.connecterBD(BDmysql.java:62)

at horsligne.util.BDGenerale.<init>(BDGenerale.java:26)

at horsligne.ui.NouveauProjetUi.actionPerformed(NouveauProjetUi.java:209)

at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.setPressed(Unknown Source)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)

at java.awt.Component.processMouseEvent(Unknown Source)

at javax.swing.JComponent.processMouseEvent(Unknown Source)

at java.awt.Component.processEvent(Unknown Source)

at java.awt.Container.processEvent(Unknown Source)

at java.awt.Component.dispatchEventImpl(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)

at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)

at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Window.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(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)

 

** END NESTED EXCEPTION **

 

SQLState: 08S01

VendorError: 0

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

at horsligne.util.BDmysql.creerTable(BDmysql.java:79)

at horsligne.util.BDGenerale.<init>(BDGenerale.java:27)

at horsligne.ui.NouveauProjetUi.actionPerformed(NouveauProjetUi.java:209)

at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.setPressed(Unknown Source)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)

at java.awt.Component.processMouseEvent(Unknown Source)

at javax.swing.JComponent.processMouseEvent(Unknown Source)

at java.awt.Component.processEvent(Unknown Source)

at java.awt.Container.processEvent(Unknown Source)

at java.awt.Component.dispatchEventImpl(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)

at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)

at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Window.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(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)


PS: Hors ligne c'est le nom du projet.
      L'application a été compilé l'année dernière et tout marchait bien alors le pb ne doit pas etre un pb de programmation.
A votre avis c'est koi la solution de ce pb.
Je vous remercie.
C'est urgent.
Merci d'avance.

jeudi 24 mars 2005 à 11:51:49 | Re : connection java avec bd mysql

bloofi


java.net.UnknownHostException...
lé ptet la le problème non ?


Cette discussion est classée dans : java, source, awt, at, unknown


Répondre à ce message

Sujets en rapport avec ce message

Problème d'événements [ par ellandebasque ] Bonjour,je développe une application (logique). J'ai créé des boutons, des menus. Je leur ai rattaché des événements. Le problème est que certains (le "AWT-EventQueue-0" [ par shumi5 ] Bonjour, la compilation du mon application java m'affiche ce message:Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: JPopupMenu avec un JPanel [ par Se7enSinsMan ] Bonjour,     J'ai un petit souci en Java. J'ai un un JPanel avec une image et différents JLabel qui s'affichent bien nickel. Je voudrais que lorsque java.io.FileNotFoundException: (Accès refusé) [ par sheorogath ] bonjour a tous, je suis en plein developpement d'un client ftpapres avoir bientot finni je me suis appercu que ca serai que l'utilisateur puisse chpoi Web Services & Accès serveur [ par xen16 ] Bonjour à tous !  Je suis en train de développer une application faisant appel aux web services. Je développe sous Eclipse combiné avec Apache Tomcat. Import d'une librairie [ par el_teedee ] Salut, voilà j'utilise une librairie perso pour faire des expressions régulières. Cette librairie est com.stevesoft.pat, dans laquelle se trouve une Erreur incomprise sur les checkBox [ par Basounours ] Bonjour, je suis un debutant en IHM et j'essaie de faire on application assez simple. La 1ere interface doit me diriger sur une 2ème selon le resulta Problème de connection de base de données [ par yayamo ] Bonjour,Une application .jar exécutable  est fournie à l'hébergeur,  lorsque que je lance le fichier .jnlp via le web pour exécuter l'application .jar connection au base de donnée Mysql [ par yayamo ] Bonjour, Une application .jar exécutable  est fournie à l'hébergeur,  lorsque que je lance le fichier .jnlp via le web pour exécuter l'application . Projet exporté en jar ne s'execute pas [ par thanatos67 ] Salutation. Je suis en 2ème année de bts IRIS (informatique),et j'ai un projet en java développé avec Eclipse à réaliser. J'ai dans le projet une appl


Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Février 2012
LMMJVSD
  12345
6789101112
13141516171819
20212223242526
272829    

Consulter la suite du CalendriCode

Photothèque

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 4,337 sec (3)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales