Bonjour tout le monde,je rencontre un probléme de connexion à ma base et je n'arrive pas à localiser la source voici le code tout d'abord :
 
Code :
 - public static void Insertion2(int id,String diag) throws SQLException,ClassNotFoundException{
 -   Connection conn=null;
 -   try
 -   {
 -   	DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
 -   	Class.forName ("oracle.jdbc.OracleDriver" );
 -   conn = DriverManager.getConnection("jdbc:oracle:thin:@//PC-DE-MOI:1521/XE","Anon","anonymous" );
 -   }
 - 	    catch(Exception ex){
 - 	     System.out.println(ex.getMessage());
 - 	    }
 - 	    try{
 - 	    PreparedStatement P1=conn.prepareStatement("Insert INTO PRINCIPALE(ID,DIAGNOSIS) VALUES (?,?)" );
 - 	    P1.setInt(1,id);
 - 	    P1.setString(2,diag);
 - 	    P1.executeQuery();
 - 	    P1.close();
 - 	    }
 - 	    catch(Exception exx){
 - 	     System.out.println(exx.getMessage());
 - 	    }
 - 	}
 
  | 
 
Quand j'essaye d'exécuter cette fonction j'obtiens ce message d'erreur :
 Citation :
 
 Listener refused the connection with the following error: ORA-12516, TNS:listener could not find available handler with matching protocol stack The Connection descriptor used by the client was: //PC-de-Moi:1521/XE
   | 
  -Je suis complètement bloqué car je n'arrive pas à transférer mes données ça serait vraiment sympa de m'aider,merci.
 
Message édité par DaMehdi le 21-11-2008 à 11:06:48