When I connect to the OracleDriver in the application, everything is fine. But when I want to connect to run the JUnit Tests, I got a ClassNotFoundException. And I do exactly the same!
I have the ojbc added to the library and the testlibrary.
public JDBCDataStorage(boolean production) throws DataStorageException {
this.production = production;
try {
rb = (PropertyResourceBundle) PropertyResourceBundle.getBundle("app.control.database.JDBCconfig");
Class.forName(rb.getString("driver"));
} catch (ClassNotFoundException e) {
throw new DataStorageException("Something went wrong in new JDBCDataStorage()" + ": " + e.getMessage());
}
DriverManager.setLoginTimeout(3);
}