Bonjour,
pour acceder a une base de donnees oracle distante j'ai un probleme avec mes drivers :
l'erreur intervient a cette partie du code :Connecting to the SSD Database......
An error has occurred during the connection phase! This is most likely due to your CLASSPATH being set wrong and the Oracle classes unable to be found. Otherwise the database itself may be down. Try telneting to port 1521 and see if it is up!
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1332)
pourtant dans les proprietes du projet sous elcipse j'ai bien mis addjar et j'ai mis le jar correspondant aux drivers oracle : ojdbc14.jar. le jar apparait bien dans mon projet avec la classe :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 try { System.out.println("\nConnecting to the SSD Database......"); Class.forName("oracle.jdbc.driver.OracleDriver"); con = DriverManager.getConnection(JDBCUrl, username, password); } catch (Exception e) { System.out.println("\nAn error has occurred during the connection phase! This is most likely due to your CLASSPATH being set wrong and the" + " Oracle classes unable to be found. Otherwise the database itself may be down. Try telneting to port 1521 and see if it is up!"); e.printStackTrace(); System.exit(0); }
oracle.jdbc.driver.OracleDriver
De plus j'ai ajoute dans mes variables environnements dans system windows :
.;C:\Logiciels\j2sdk1.5\jre\lib\rt.jar;C:\Temp\Server-side\JDBC\ojdbc14.jar
j'ai verifier plusieurs fois chaque etapes. Qu'est ce qui va pas ? j'ai fait ce qu'il a dit donc je vois pas ...
Partager