I'm using oracle JDBC driver in a dynamic web application have this exception
...
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:315)
at com.zaxxer.hikari.util.DriverDataSource.<init>(DriverDataSource.java:106)
... 56 more
however the driver should be correctly loaded while deployment a picture showing Deployment Assembly property with oracle driver in it
Edit: eclipse show me this warning after cleaning the project
Classpath entry xxxx/ojdbc6.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. service P/service Classpath Dependency Validator Message
Edit: information about my system:
1- tomcat 8.5: I've the driver in $CATALINA_HOME/lib btw
2- oracle 11g [ojdbc6]: with HikariCP
3- eclipse 4.14.0: +maven using jersey webapp archetype
Edit: it worked previously with a normal (not web) project
Edit: this is how i had configured the datasource
config.setJdbcUrl(jdbcUrl);
config.setUsername(username);
config.setPassword(passsword);
config.addDataSourceProperty( "cachePrepStmts" , "true" );
config.addDataSourceProperty( "prepStmtCacheSize" , "250" );
config.addDataSourceProperty( "prepStmtCacheSqlLimit" , "2048" );
// config.addDataSourceProperty("driverClassName", "oracle.jdbc.driver.OracleDriver");
config.setDriverClassName("oracle.jdbc.driver.OracleDriver")
}
ds = new HikariDataSource(config);
//some code
driverClassNameproperty. The Hikari documentation for theirjdbcUrlproperty mentions: "When using this property with "old" drivers, you may also need to set the driverClassName property". If I recall, the driver class name is simply "oracle.jdbc.OracleDriver". Others may correct me, if that is wrong. - andrewjamesDriverManagerclass but the driver wasn't found either. so now i think it is a problem related to tomcat - Abdullah Khaled