如果一个tomcat应用包含多个模块使用Proxool连接池,而第二个使用Proxool连接池的模块使用自带的
proxool-0.9.1.jar proxool-cglib.jar 文件,那么有可能导致以下错误,即使jar文件版本完全一致。
解决方法:从模块私有的lib中删除proxool-0.9.1.jar proxool-cglib.jar 文件,使用公共lib。
1. 访问需要使用Proxool连接池的网页抛出错误:
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.ExceptionInInitializerError
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
javax.servlet.ServletException: java.lang.ExceptionInInitializerError
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:852)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.qrRun_jsp._jspService(qrRun_jsp.java:152)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.lang.ExceptionInInitializerError
org.logicalcobwebs.proxool.ProxyFactory.getProxy(ProxyFactory.java:111)
org.logicalcobwebs.proxool.ProxyFactory.getWrappedConnection(ProxyFactory.java:85)
org.logicalcobwebs.proxool.ConnectionPool.getConnection(ConnectionPool.java:261)
org.logicalcobwebs.proxool.ProxoolDataSource.getConnection(ProxoolDataSource.java:97)
com.ifugle.qrm.sql.Transaction.getTransaction(Transaction.java:234)
com.ifugle.qrm.context.QRMContext.getMainTransaction(QRMContext.java:214)
com.ifugle.qrm.context.QRMLogin.isValidLogin(QRMLogin.java:55)
org.apache.jsp.qrRun_jsp._jspService(qrRun_jsp.java:62)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.lang.ClassCastException: org.logicalcobwebs.cglib.proxy.Enhancer$EnhancerKey$$KeyFactoryByCGLIB$$56f571c0 cannot be cast to org.logicalcobwebs.cglib.core.KeyFactory
org.logicalcobwebs.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
org.logicalcobwebs.cglib.core.KeyFactory.create(KeyFactory.java:117)
org.logicalcobwebs.cglib.core.KeyFactory.create(KeyFactory.java:108)
org.logicalcobwebs.cglib.core.KeyFactory.create(KeyFactory.java:104)
org.logicalcobwebs.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
org.logicalcobwebs.proxool.ProxyFactory.getProxy(ProxyFactory.java:111)
org.logicalcobwebs.proxool.ProxyFactory.getWrappedConnection(ProxyFactory.java:85)
org.logicalcobwebs.proxool.ConnectionPool.getConnection(ConnectionPool.java:261)
org.logicalcobwebs.proxool.ProxoolDataSource.getConnection(ProxoolDataSource.java:97)
com.ifugle.qrm.sql.Transaction.getTransaction(Transaction.java:234)
com.ifugle.qrm.context.QRMContext.getMainTransaction(QRMContext.java:214)
com.ifugle.qrm.context.QRMLogin.isValidLogin(QRMLogin.java:55)
org.apache.jsp.qrRun_jsp._jspService(qrRun_jsp.java:62)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.
2. 再次访问或直接刷新以上网页抛出不同错误:
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class org.logicalcobwebs.cglib.proxy.Enhancer
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class org.logicalcobwebs.cglib.proxy.Enhancer
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:852)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.login_jsp._jspService(login_jsp.java:202)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.lang.NoClassDefFoundError: Could not initialize class org.logicalcobwebs.cglib.proxy.Enhancer
org.logicalcobwebs.proxool.ProxyFactory.getProxy(ProxyFactory.java:111)
org.logicalcobwebs.proxool.ProxyFactory.getWrappedConnection(ProxyFactory.java:85)
org.logicalcobwebs.proxool.ConnectionPool.getConnection(ConnectionPool.java:261)
org.logicalcobwebs.proxool.ProxoolDataSource.getConnection(ProxoolDataSource.java:97)
com.ifugle.qrm.sql.Transaction.getTransaction(Transaction.java:234)
com.ifugle.qrm.context.QRMContext.getMainTransaction(QRMContext.java:214)
com.ifugle.qrm.context.QRMLogin.login(QRMLogin.java:138)
org.apache.jsp.login_jsp._jspService(login_jsp.java:81)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.
分享到:
相关推荐
jar包,官方版本,自测可用
标题中的"proxool-0.9.1.jar"和"proxool-cglib.jar"是两个重要的Java档案文件,它们是Proxool项目的组件。Proxool是一个开源的数据库连接池解决方案,它允许开发者在Java应用程序中高效地管理数据库连接。数据库连接...
标题中的"proxool-0.9.1.jar"和"proxool_cglib-0.9.1.jar"是两个Java库文件,它们是Proxool项目在0.9.1版本时的实现。Proxool是一个开源的数据库连接池,它提供了一种灵活且高效的解决方案来管理数据库连接。在Java...
在IT行业中,数据库连接池是优化数据库访问性能和资源管理的重要工具。Proxool是一个开源的、轻量级的Java数据库连接池实现,它提供了一种高效、灵活的方式来管理数据库连接。在某些场景下,为了保护敏感信息,如...
Invalid property 'houseKeepingSleepTime' of bean class [org.logicalcobwebs.proxool.ProxoolDataSource]: Bean property 'houseKeepingSleepTime' is not writable or has an invalid setter method. Does the ...
在给定的文件信息中,我们关注的是两个JAR文件:"proxool-0.6.jar" 和 "proxool-cglib.jar"。这两个文件涉及到一个名为Proxool的开源数据库连接池组件。 Proxool(Proxy Object Pool)是一个轻量级的Java数据源解决...
而`proxool-cglib.jar`是代码生成库,主要用于动态代理和增强,Proxool在处理数据库连接时可能需要用到CGLIB进行对象的代理。 **总结** Proxool作为数据库连接池,通过配置参数可以灵活地调整连接池的行为,以满足...
Proxool 是一个开源的 Java 连接池库,它提供了数据库连接池管理服务,用于提高应用在处理大量并发数据库请求时的性能和效率。在Java应用程序中,尤其是在服务器端,数据库连接池是一个关键组件,它通过复用已建立的...
proxool-cglib.jarproxool-cglib.jarproxool-cglib.jarproxool-cglib.jar
Proxool是一个开源的Java数据连接池实现,它允许开发者在应用中管理和复用数据库连接,减少创建和关闭数据库连接的开销,从而提高系统性能。 标题中的"proxool-0.9.1 jar;proxool-cglib.jar;"指的是Proxool的0.9.1...
Oracle Proxool是一个轻量级的数据库连接池,它为Java应用程序提供了高效的数据库连接管理。在Java应用中,使用数据库连接池可以显著提高性能和资源利用率,因为它们减少了创建和销毁数据库连接的开销。Proxool是...
- **初始化和使用**:在Java代码中,通过`DriverManager.getConnection()`方法使用Proxool提供的URL来获取连接,Proxool会自动处理连接的创建和回收。 4. **Proxool与其他连接池对比** Proxool与C3P0、DBCP、...
SEVERE: The web application [/xxx] registered the JDBC driver [org.logicalcobwebs.proxool.ProxoolDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the...
具体是对org.logicalcobwebs.proxool.admin.servlet.AdminServlet类。发现果然没有做response的字符设置。 在doGet(HttpServletRequest request, HttpServletResponse response)方法里加入了一句response....
标题中的"proxool-0.9.0RC2-source.tar.gz"是一个开源软件的源代码压缩包,其中"proxool"是项目的名称,"0.9.0RC2"代表这是该软件的0.9.0版本的第二个候选发布版(Release Candidate 2)。".tar.gz"扩展名表明这是一...
proxool数据库连接池jar2013-4月份的
- `fatal-sql-exception-wrapper-class`:允许用户自定义一个异常包装类来包装SQLException,如Proxool自带的'org.logicalcobwebs.proxool.FatalSQLException'或'org.logicalcobwebs.proxool.FatalRuntimeException'...
3. `proxool-0.9.1.jar`:这是Proxool 0.9.1版本的JAR文件,提供了更新的功能和可能的性能优化或错误修复。 Proxool的核心特性包括: - 连接池管理:它可以维护一组预创建的数据库连接,提高应用的性能和响应速度,...
<servlet-class >org.logicalcobwebs.proxool.configuration.ServletConfigurator </servlet-class > <init-param > <param-name >xmlFile </param-name > <param-value >WEB-INF/Proxool.xml </param-value > ...
import org.logicalcobwebs.proxool.ProxoolException; import org.logicalcobwebs.proxool.ProxoolFacade; import org.logicalcobwebs.proxool.admin.SnapshotIF; ``` 2. **定义PoolManager类**: ```java ...