This is from the JDBC DataSource howto:
DBCP uses the Jakarta-Commons Database Connection Pool. It relies on number of Jakarta-Commons componenets:
* Jakarta-Commons DBCP 1.0 * Jakarta-Commons Collections 2.0 * Jakarta-Commons Pool 1.0
These jar files along with your the jar file for your JDBC driver should be installed in |$CATALINA_HOME/common/lib|.
*NOTE:*Third Party drivers should be in jarfiles, not zipfiles.
Tomcat only adds |$CATALINA_HOME/common/lib/*.jar| to the classpath.
*NOTE:* Do not install these jarfiles in your |/WEB-INF/lib|, or
|$JAVA_HOME/jre/lib/ext|, or anywhere else. You will experience
problems if you install them anyplace other than
|$CATALINA_HOME/common/lib|.
Erik
Ivan Vasquez wrote:
Sure, in common/lib it works well. But from Tomcat docs: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html
The following rules cover about 95% of the decisions that application developers and deployers must make about where to place class and resource files to make them available to web applications:
* For classes and resources specific to a particular web application, place unpacked classes and resources under /WEB-INF/classes of your web application archive, or place JAR files containing those classes and resources under /WEB-INF/lib of your web application archive. * For classes and resources that must be shared across all web applications, place unpacked classes and resources under $CATALINA_BASE/shared/classes, or place JAR files containing those classes and resources under $CATALINA_BASE/shared/lib.
--Then goes on...---
Common - This class loader contains additional classes that are made visible to both Tomcat internal classes and to all web applications. Normally, application classes should NOT be placed here. All unpacked classes and resources in $CATALINA_HOME/common/classes, as well as classes and resources in JAR files under the $CATALINA_HOME/commons/endorsed and $CATALINA_HOME/common/lib directories, are made visible through this class loader.
Shared - This class loader is the place to put classes and resources that you wish to share across ALL web applications (unless Tomcat internal classes also need access, in which case you should put them in the Common class loader instead). All unpacked classes and resources in $CATALINA_BASE/shared/classes, as well as classes and resources in JAR files under $CATALINA_BASE/shared/lib, are made visible through this class loader.
----
In our case we want to share jars common to all applications, but none of them are required by Tomcat.
Ivan.
-----Original Message-----
From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 12:52 PM
To: Struts Users Mailing List
Subject: Re: Classloading problem
I have been using 5.0.27, putting my JDBC drivers in common/lib, and my struts jars in WEB-INF/lib of each application, and haven't had any problems. Why do you say "incorrectly"?
Erik
Ivan Vasquez wrote:
We have Tomcat 5.0.16 and were incorrectly placing common jars (such asWhat
JDBC drivers) in /common/lib.
Now we just moved them to /shared/lib (for truly common stuff) and WEB-INF/lib, but now all applications complain giving a java.lang.ClassNotFoundException, just like if things weren't in Tomcat's classpath anymore. Apps and Tomcat restarts have been done several times.
Is there anything in web.xml, server.xml, etc that needs to be set?
are we possibly missing? Tomcat docs are pretty straightforward aboutit
and everything seems right.
Once again, thanks in advance. Ivan.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]