tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rohitmp <rohi...@gmail.com>
Subject Re: DBCP: Threads sitting forever in getConnection()?
Date Sun, 16 Mar 2008 20:29:47 GMT
HI All,
I too am facing the same issue.
But in contrast i have my resource setup in context.xml only
But still tomcat is waiting indefinitely to to get a connection.

My context file is as below

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/mycontextpath">
    <Resource name="jdbc/connPool" auth="Container"
            type="javax.sql.DataSource" username="schot" password="tiger"
            driverClassName="org.gjt.mm.mysql.Driver"
url="jdbc:mysql://localhost:3306/myDb"
            maxActive="100" maxIdle="30"/>
            
   </Context>

the relevant thread dump is as follows

"http-8080-Processor2" daemon prio=10 tid=0x08374800 nid=0xef4 
in Object.wait() [0xae069000..0xae069e30]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0xaf619100> (a org.apache.tomcat.dbcp.pool.impl.GenericObjectPool)
	at java.lang.Object.wait(Object.java:485)
	at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject
(GenericObjectPool.java:810)
	- locked <0xaf619100> (a org.apache.tomcat.dbcp.pool.impl.GenericObjectPool)
	at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection
(PoolingDataSource.java:96)
	at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection
(BasicDataSource.java:880)
	at com.bhagin.vaanee.util.DBConnection.init
(DBConnection.java:64)
	at com.bhagin.vaanee.authorisation.AttributeBeanSetter.fngetSessionAttributeBean
(AttributeBeanSetter.java:42)
	at org.apache.jsp.authorize_jsp._jspService
(authorize_jsp.java:116)
	at org.apache.jasper.runtime.HttpJspBase.service(
HttpJspBase.java:98)
	at javax.servlet.http.HttpServlet.service
(HttpServlet.java:803)
	at org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:331)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:329)
	at org.apache.jasper.servlet.JspServlet.service
(JspServlet.java:265)
	at javax.servlet.http.HttpServlet.service
(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:269)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:188)
	at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:174)
	at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:117)
	at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:108)
	at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:151)
	at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:874)
	at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.
processConnection(Http11BaseProtocol.java:665)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
(PoolTcpEndpoint.java:528)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
(LeaderFollowerWorkerThread.java:81)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:689)
	at java.lang.Thread.run(Thread.java:619)


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message