Best unofficial Apache Server developers community |
|
The Problem Anytime I start my Tomcat server via Eclipse I always get a Class not found error:
The Setup My server.xml file has a resource setup like:
context.xml has an entry that looks like so:
On my application, I'm using Oracle's JDBC driver - classes12.jar The Question What do I need to fix on the Tomcat server so that it can find the appropriate class - Thanks!
posted via StackOverflow
|
|
 
|
The simplest fix, assuming that
|
|
 
|
Assuming Tomcat 6, the required library needs to be copied to From the Tomcat documentation on setting up JDBC DataSources:
Also, I would avoid using |
|
 
|
Not classes12.jar; that's JDK 1.2 vintage. Your Oracle JDBC driver JAR ought to match your JDK and Oracle versions (e.g. ojdbc16.jar for JDK 1.6). Put that in your Tomcat /server/lib for Tomcat version 5.x and /lib for Tomcat version 6.x and higher. I'd also recommend not altering your server.xml file. Better to put that information in your project's META-INF/context.xml file. |
|
 
|
From the documentation:
So yes, you have to put the jar in $CATALINA_HOME/lib |
|
 
|
Copy the classes12.jar in tomcat's /common/lib directory . |