javarevisited |
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver - cause and solution Posted: 13 Dec 2012 04:40 AM PST java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver Exception comes when you try to connect Oracle database from Java program and Oracle driver is not available in Classpath. We have already seen How to connect Oracle database from Java program and found that, In order to connect to Oracle database, we load and register driver using Class.forName("oracle.jdbc.driver.OracleDriver") and this code loads class at runtime using Reflection which throws ClassNotFoundException if class in question e.g. "oracle.jdbc.driver.OracleDriver" is not found. I have already listed down various reason of ClassNotFoundExcepiton in Java, which is also applicable in this case. By the way java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver is similar to java.lang.ClassNotFoundException: mysql.jdbc.driver.MySQLDriver which comes if you try to connect MySQL database from Java program and corresponding driver is not in your classpath. You can refer link for getting more ideas which can be used to fix java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver error as well. |
You are subscribed to email updates from Javarevisited To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
Post a Comment