Hello,
I'm attempting to use HikariCP in a Tomcat 7 environment. Please bear with me as this message is pretty long but I'm just trying to be complete.
I want to use HikariCP in Tomcat 7 pointing to Oracle, using the ojdbc6.jar file that is in the Tomcat classpath.
I downloaded the zip file from the website (
http://brettwooldridge.github.io/HikariCP/) and did the Maven build. The output was HikariCP-1.3.1-SNAPSHOT.jar which I put in my web app's WEB-INF/lib directory. I'm don't know much about Maven but the build seemed to work.
I got through the configuration, but when I try to create the HikariDataSource instance, it throws an error. I think the error is due to the dataSourceClassName property being incorrect. I've tried a few things and here is what happened.
First, I simply had oracle.jdbc.OracleDriver in as the dataSourceClassName, because this is the class name that I have in context.xml for the Tomcat connection pool. That failed and the error message said that the class is not an instance of DataSource. Big "duh" on my part.
Next, I tried oracle.jdbc.xa.client.OracleXADataSource as this seemed to pop up in the web search. This failed with a RuntimeException with this message: "Could not create datasource instance: oracle.jdbc.xa.client.OracleXADataSource". Digging further, the cause was this: java.beans.IntrospectionException: Method not found: setUrl
Lastly, I tried oracle.jdbc.xa.OracleXADataSource, just because I saw that class in the Oracle jar. That failed too: InstantiationException Could not create datasource instance: oracle.jdbc.xa.OracleXADataSource
I've run out of ideas. Any idea what I'm doing wrong? It looks like it's close but I'm not setting something right.
Thank you for your help!!!
-Ryan