Hi,
I’m trying to write some units test, so I decide to use different database.
I saw that PersistentManager implementation exposes setJDBCConnectionSetting method. So I wrote the following code:
JDBCConnectionSetting settings = new JDBCConnectionSetting();
settings.setDriver(org.hsqldb.jdbcDriver.class.getName());
settings.setConnectionURL("jdbc:hsqldb:mem:ProductDAOTest");
settings.setUserName("sa");
settings.setDialect(HSQLDialect.class.getName());
GestionePersistentManager.setJDBCConnectionSetting(settings);
Simple, but when I launch debug it alway throws new ClassNotFoundException. The message is: JDBC Driver class not found.
But I’m absolutely sure that the driver file is correctly in path.
I’m absolutely sure that the driver file is correctly in path
May I know how did you configure the connection, and how do you make sure that the driver file is in correct path?
I’m absolutely sure that the driver file is correctly in path
May I know how did you configure the connection, and how do you make sure that the driver file is in correct path?
[/quote]
About the path… I include hsqldb.jar via Intellij Idea. It launch class file with java -classpath /usr/share/java/hsqldb.jar …
Here Connection configuration is: