CSDN博客

img DickWinters

配置Struts连接池时遇到的一个问题

发表于2004/9/27 22:12:00  1417人阅读

我在配置连接池的时候(用的是commons-dbcp-1.2.1),把MySQL的JDBC驱动包放在WEB-INF/lib目录下
Tomcat启动时报错,说是ClassNotFound “org.gjt.mm.mysql.Driver”
后来在tomcat-docs发现下面一段:

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.
发现学习Java在这些配置问题的细节上要纠缠好多时间,希望将来能变好些吧。
阅读全文
0 0

相关文章推荐

img
取 消
img