有时候会启动tomcat建立数据库连接池的时候,会出现下面这个错误,一般是没有网络访问权限导致的。
Sep 26, 2012 5:45:39 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319)
at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
at org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:115)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:396)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
(END)
分享到:
相关推荐
11:01:33,545 DEBUG ThreadPoolAsynchronousRunner:730 - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@5b28c08e -- Running DeadlockDetector[Exiting. No pending tasks.] 11:01:43,558 ...
META-INF/MANIFEST.MF ...com.mchange.v2.Debug.class com.mchange.v2.c3p0.AbstractConnectionCustomizer.class com.mchange.v2.c3p0.AbstractConnectionTester.class com.mchange.v2.c3p0.C3P0ProxyConnection.class ...
com.mchange.v2.c3p0.idle_test_period=3000 ``` 4. **C3P0的API**:C3P0提供了一套API,包括` ComboPooledDataSource `类,它是连接池的主要实现类,用于初始化和管理数据库连接。开发者可以通过它的方法获取和...
《c3p0-0.9.5.5.jar.zip:深入...com.mchange.v2.c3p0.jdbcUrl=jdbc:mysql://localhost:3306/mydb com.mchange.v2.c3p0.username=myuser com.mchange.v2.c3p0.password=mypassword com.mchange.v2.c3p0.minPoolSize=5 ...
com.mchange.v2.c3p0.jdbc.DataSourceClass = com.mchange.v2.c3p0.ComboPooledDataSource driverClass=com.mysql.jdbc.Driver jdbcUrl=jdbc:mysql://localhost:3306/mydatabase initialPoolSize=5 minPoolSize=5 ...
如:Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source 使用fat jar 打包没问题: 1.解压后是一个../...
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"> <property name="driverClass" value="com.mysql.jdbc.Driver"/> <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/...
com.springsource.com.mchange.v2.c3p0-0.9.1.2.jar com.springsource.com.mchange.v2.c3p0-sources-0.9.1.2.jar
在Java开发中,数据库连接管理是一个关键环节,而C3P0和MChange(也称为Vibur DBCP)是两个常用的数据库连接池组件。它们各自有着不同的特性和使用场景,但有时候为了优化数据库访问性能,我们会将两者结合使用。在...
c3p0连接mysql8.0.11需要外加mchange-commons-java-0.2.15.jar,maven的pom.xml 中配置了,但是项目中报找不到mchange-commons-java-0.2.15.jar这个文件,可以把此文件下载后,然后解压后把对应的jar包放到maven 库...
import com.mchange.v2.c3p0.ComboPooledDataSource; public class C3P0Config { public static void main(String[] args) { ComboPooledDataSource cpds = new ComboPooledDataSource(); cpds.setDriverClass(...
2020-11-27 11:26:11|localhost-startStop-1|INFO |com.mchange.v2.log.MLog,80,|-> MLog clients using log4j logging. 2020-11-27 11:26:11|localhost-startStop-1|INFO |com.mchange.v2.c3p0.C3P0Registry,204,...
赠送jar包:mchange-commons-java-0.2.11.jar; 赠送原API文档:mchange-commons-java-0.2.11-javadoc.jar; 赠送源代码:mchange-commons-java-0.2.11-sources.jar; 赠送Maven依赖信息文件:mchange-commons-java-...
这个RAR压缩包包含了两个重要的JAR文件,分别是c3p0-0.9.5.2.jar和mchange-commons-java-0.2.11.jar。 1. **c3p0-0.9.5.2.jar**:这是C3P0的核心库文件,版本为0.9.5.2。C3P0是由Mchange公司开发的一个开源的数据库...
赠送jar包:mchange-commons-java-0.2.11.jar; 赠送原API文档:mchange-commons-java-0.2.11-javadoc.jar; 赠送源代码:mchange-commons-java-0.2.11-sources.jar; 赠送Maven依赖信息文件:mchange-commons-java-...
log4j:WARN No appenders could be found for logger (com.mchange.v2.log.MLog). log4j:WARN Please initialize the log4j system properly.
2. **com.mchange.v2.c3p0.jar**:这个包是C3P0的全名,包含了一些额外的依赖,如Mchange的其他组件,这些组件可能在某些特定功能或异常处理中使用。 3. **mysql-connector-java.jar** (或对应数据库驱动):C3P0...
com.springsource.com.mchange.v2.c3p0-0.9.1.2.jar com.springsource.org.aopalliance-1.0.0.jar com.springsource.org.apache.commons.logging-1.1.1.jar com.springsource.org.apache.log4j-1.2.15.jar ...
赠送jar包:mchange-commons-java-0.2.15.jar; 赠送原API文档:mchange-commons-java-0.2.15-javadoc.jar; 赠送源代码:mchange-commons-java-0.2.15-sources.jar; 赠送Maven依赖信息文件:mchange-commons-java-...
《mchange-commons-java-0.2.11.jar:深入了解Maven依赖与Java库的构建》 在Java开发中,我们经常会遇到各种各样的jar文件,它们是Java应用程序的基础,提供了丰富的功能和API。"mchange-commons-java-0.2.11.jar...