0
votes

I have multiple db connection from my application. Recently we upgraded ojdbc version to 8 (ojdbc8) and some of the db connection began throwing exceptions, especally when executing stored procedures using spring jdbc templates. Those are databases with oracle version 9. If we switch back to older driver (ojdbc7) this works but other db integration fails. Is there any way I can use ojdbc7 driver for one database connection and ojdbc8 driver for others? We are using tomcat-8 and can we do this in server.xml?

1

1 Answers

0
votes

I don't think you can load more than one version of a jdbc library in tomcat's CLASSPATH. You could try though loading your jdbc connection pool on your application context META-INF/context.xml and adding the jdbc library in WEB-INF/lib folder for each application. If this works it would mean that your tomcat would load each jdbc library again and again for every application. I would highly suggest splitting your applications into 2 tomcats (one with ojdbc7 and one with ojdbc8), so that you have a more clean setup.