Salut tout le monde
mon code produit une exception lorsque j'essaie de créer une connexion
voici mon code :
et voici l'exception :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 public static void testConnection(){ try{ Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/maBase", "root", ""); }catch(SQLException sqe){ System.out.println("Ooops : SQLException"); System.out.println(sqe.getMessage()); }catch(ClassNotFoundException cnfe){ System.out.println("Ooops : ClassNotFoundException"); } }
Mes outils sont : eclipse, easyphp 1.8 ?Ooops : SQLException
Unable to connect to any hosts due to exception: java.lang.ArrayIndexOutOfBoundsException: 40
est ce un probleme port ?
Et Merci d'avance de votre aide
Partager