I am trying to migrate an application from WebSphere to Tomcat. I use JDBC connection pool to create connections and all the webapps shared it. But since Tomcat doesn't support EAR files. I am deploying all the different webapps separately. The jar file that has connection sharing code, I have put it in the Tomcat/lib folder. And also the ojdbc5.jar
and ucp.jar
in the same folder.
First I tried with the old shared objects code. And it threw some funky errors like:
class oracle.jdbc.driver.$Proxy35 cannot access its superinterface oracle.jdbc.driver.ScrollRsetStatement
or
java.lang.IllegalArgumentException: interface oracle.jdbc.internal.ClientDataSupport is not visible from class loader
This is the line causing issues.
connection = dataSource.getConnection();
After that I made the code that every webapp has its own connection object (not very efficient). But somehow even then the errors show up. Can you please guide me on how to get rid of this issue. I might have been a bit vague, because the issue is a little tricky to explain. If you need more info please do let me know.