Idea Ver: 12.1.4
Project JDK: 1.6.0_20
JUnit Ver: 4.8.1
- Running a JUnit test involving JDBC with Oracle
- SQL Exception thrown during: DriverManager.registerDriver (new oracle.jdbc.OracleDriver());
"java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@......"
- Confirmed that the jar: ojdbc14.jar is included in the classpath that is printed out on the console. The entire java command is 4847 bytes.
- Confirmed the URL, UserId, Passwd are correct
- Classpath for the JUnit tests is set to that of the module being tested.
- I dont see the issue when I invoke the JUnit test methods (setUp(), testCases...) from a non-JUnit test class in the main module. This test is a hacked up main().
- Also, no JDBC issues when running the app
Looks like ojdbc14.jar is not found/loaded while running the JUnit test.