3 Replies Latest reply on May 10, 2008 3:05 AM by Vicky Kak

    No Managed connection available within configured blocking t

    Chandrakanth Patil Newbie

      I am using jboss 3.2.6, hibernate 2.0. Everything was working properly. Before 3 days I stated using my application on a huge DB. it is 50GB DB on sql server. After running the application for 8 hours continuously, I got No Managed connection available exception. I restarted jboss and again after 9 to 10 hours same thing happens. Here is the log.

      2008-05-07 21:03:14,576 ERROR errors - Error occured...
      com.iri.common.exception.JFRunTimeException
      at com.iri.common.dao.JFBaseDAO.getConnection(JFBaseDAO.java:64)
      at com.iri.common.dao.SQLServerIRIConfigureService.getValueForField(SQLServerIRIConfigureService.java:26)
      at org.apache.jsp.jobdetails_jsp._jspService(jobdetails_jsp.java:114)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(Unknown Source)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(Unknown Source)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Unknown Source)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: org.jboss.util.NestedSQLException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ); - nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ))
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(Unknown Source)
      at com.iri.common.dao.JFBaseDAO.getConnection(JFBaseDAO.java:62)
      ... 39 more
      Caused by: javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] )
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(Unknown Source)
      ... 41 more
      2008-05-07 21:03:34,512 DEBUG com.iri.common.dao.JFDataAccessFactory - Starting debugging getInstance:JFDataAccessFactory
      2008-05-07 21:03:34,512 DEBUG com.iri.common.dao.SQLServerDataAccessFactory - Starting debugging getDataAccessService:SQLServerDataAccessFactory
      2008-05-07 21:03:39,558 ERROR errors - Error occured...
      com.iri.common.exception.JFRunTimeException
      at com.iri.common.dao.JFBaseDAO.getConnection(JFBaseDAO.java:64)
      at com.iri.common.dao.SQLServerIRIConfigureService.getValueForField(SQLServerIRIConfigureService.java:26)
      at org.apache.jsp.jobdetails_jsp._jspService(jobdetails_jsp.java:114)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(Unknown Source)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(Unknown Source)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Unknown Source)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: org.jboss.util.NestedSQLException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ); - nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ))
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(Unknown Source)
      at com.iri.common.dao.JFBaseDAO.getConnection(JFBaseDAO.java:62)
      ... 39 more
      Caused by: javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] )
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(Unknown Source)
      ... 41 more
      --------------------------------------------------------------------------------

      Here is my x-ds.xml file

      <local-tx-datasource>
      <jndi-name>jobDS</jndi-name>
      <connection-url>jdbc:jtds:sqlserver://localhost:1433/Reg_DB;prepareSQL=2</connection-url>
      <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
      <user-name>sa</user-name>
      sa
      <new-connection-sql>select count(1) from job_templates</new-connection-sql>
      <check-valid-connection-sql>select count(1) from job_templates</check-valid-connection-sql>
      <min-pool-size>10</min-pool-size>
      <max-pool-size>50</max-pool-size>
      </local-tx-datasource>


      The JTDS driver version is 1.2.2 (I got this exception on 0.9 version also). I will be thankful if any one can address the issue. Thanks in advance.