Salut tout le monde
mon code produit une exception lorsque j'essaie de créer une connexion
voici mon code :
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");
		}
	}
et voici l'exception :
Ooops : SQLException
Unable to connect to any hosts due to exception: java.lang.ArrayIndexOutOfBoundsException: 40
Mes outils sont : eclipse, easyphp 1.8 ?
est ce un probleme port ?
Et Merci d'avance de votre aide