This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Connection Wait Timeout Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connection Wait Timeout Exception" Watch "Connection Wait Timeout Exception" New topic
Author

Connection Wait Timeout Exception

Abhijit Akhuj
Greenhorn

Joined: Oct 03, 2008
Posts: 2
Hi All

Please find the below log saying "Connection not available, Timed out waiting for 180000"

[02/10/08 13:43:06:595 BST] 00002753 FreePool E J2CA0045E: Connection not available while invoking method createOrWaitForConnection for resource jdbc/raDataSource.
[02/10/08 13:43:06:647 BST] 00002753 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl initialize FFDC0009I: FFDC opened incident stream file /apps/was/ws6.1/inst01/profiles/pttcis_cell/pttcis_amswst51/logs/ffdc/pttcdm_amswst51_3_fe536c_08.10.02_13.43.06_0.txt
[02/10/08 13:43:06:723 BST] 00002753 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file /apps/was/ws6.1/inst01/profiles/pttcis_cell/pttcis_amswst51/logs/ffdc/pttcdm_amswst51_3_fe536c_08.10.02_13.43.06_0.txt
[02/10/08 13:43:06:737 BST] 00002753 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file /apps/was/ws6.1/inst01/profiles/pttcis_cell/pttcis_amswst51/logs/ffdc/pttcdm_amswst51_3_fe536c_08.10.02_13.43.06_1.txt
[02/10/08 13:43:06:798 BST] 00002753 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file /apps/was/ws6.1/inst01/profiles/pttcis_cell/pttcis_amswst51/logs/ffdc/pttcdm_amswst51_3_fe536c_08.10.02_13.43.06_1.txt
[02/10/08 13:43:06:805 BST] 00002753 DecisionServi E com.kiq.omega.ods.core.PropertyColumnEvaluator evalInputProperties Data adapter error.
com.chordiant.dm.ddc.DataAdapterException: com.ibm.websphere.ce.cm.ConnectionWaitTimeoutException: Connection not available, Timed out waiting for 180008
at com.chordiant.dm.ddc.jdbc.AbstractJDBCAdapter.getConnection(Unknown Source)
at com.chordiant.dm.ddc.ids.QAAdapter.getRecord(Unknown Source)
at com.chordiant.dm.ddc.DataCollector.getRecord(DataCollector.java:144)
at com.kiq.omega.ods.core.PropertyColumnEvaluator.evalInputProperties(Unknown Source)
at com.kiq.omega.ods.core.PropertyColumnEvaluator.generateBean(Unknown Source)
at com.kiq.omega.ods.core.BeanEvaluator.generateBean(Unknown Source)
at com.kiq.omega.ods.ejb.DecisionServiceBean.makeDecision(Unknown Source)
at com.kiq.omega.ods.interfaces.EJSLocalStatelessDecisionService_1c36142d.makeDecision(Unknown Source)
at com.kiq.omega.ods.ejb.DecisionControllerBean.makeDecision(Unknown Source)
at com.kiq.omega.ods.interfaces.EJSLocalStatelessDecisionController_016f0b4b.makeDecision(Unknown Source)
at com.chordiant.dm.ra.service.RTDSService.makeDecision(RTDSService.java:231)
at com.chordiant.dm.ra.service.RTDSService.getDecisionMode(RTDSService.java:424)
at com.chordiant.dm.ra.action.SearchActions.searchCustomer(SearchActions.java:90)
at com.chordiant.dm.ra.action.SearchActions.searchCustomerFromForm(SearchActions.java:126)
at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:266)
at com.chordiant.dm.ra.action.util.DispatchMethodAction.execute(DispatchMethodAction.java:38)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:413)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:225)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:446)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at com.chordiant.dm.ra.action.util.HibernateFilter.doFilter(HibernateFilter.java:37)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:100)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
Caused by: com.ibm.websphere.ce.cm.ConnectionWaitTimeoutException: Connection not available, Timed out waiting for 180008
at com.ibm.ws.rsadapter.AdapterUtil.toSQLException(AdapterUtil.java:1233)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:444)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:400)
... 53 more
Caused by: com.ibm.websphere.ce.j2c.ConnectionWaitTimeoutException: Connection not available, Timed out waiting for 180008
at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1494)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2145)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:846)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:585)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:431)
... 54 more

[02/10/08 13:43:06:827 BST] 00002753 CustomExcepti E com.chordiant.dm.ra.action.util.CustomExceptionHandler execute Exception: com.chordiant.dm.ra.util.ServiceException: com.chordiant.dm.dedo.DecisionServiceException: Internal error. Data adapter error. com.ibm.websphere.ce.cm.ConnectionWaitTimeoutException: Connection not available, Timed out waiting for 180008
com.chordiant.dm.ra.util.ServiceException: com.chordiant.dm.dedo.DecisionServiceException: Internal error. Data adapter error. com.ibm.websphere.ce.cm.ConnectionWaitTimeoutException: Connection not available, Timed out waiting for 180008
at com.chordiant.dm.ra.service.RTDSService.makeDecision(RTDSService.java:246)
at com.chordiant.dm.ra.service.RTDSService.getDecisionMode(RTDSService.java:424)
at com.chordiant.dm.ra.action.SearchActions.searchCustomer(SearchActions.java:90)
at com.chordiant.dm.ra.action.SearchActions.searchCustomerFromForm(SearchActions.java:126)
at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:266)
at com.chordiant.dm.ra.action.util.DispatchMethodAction.execute(DispatchMethodAction.java:38)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:413)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:225)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:446)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at com.chordiant.dm.ra.action.util.HibernateFilter.doFilter(HibernateFilter.java:37)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:100)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
Caused by: com.chordiant.dm.dedo.DecisionServiceException: Internal error. Data adapter error. com.ibm.websphere.ce.cm.ConnectionWaitTimeoutException: Connection not available, Timed out waiting for 180008
at com.kiq.omega.ods.ejb.DecisionControllerBean.makeDecision(Unknown Source)
at com.kiq.omega.ods.interfaces.EJSLocalStatelessDecisionController_016f0b4b.makeDecision(Unknown Source)
at com.chordiant.dm.ra.service.RTDSService.makeDecision(RTDSService.java:231)
... 42 more

[02/10/08 13:43:24:410 BST] 00002756 FreePool E J2CA0045E: Connection not available while invoking method createOrWaitForConnection for resource jdbc/raDataSource.
[02/10/08 13:43:24:434 BST] 00002756 DecisionServi E com.kiq.omega.ods.core.PropertyColumnEvaluator evalInputProperties Data adapter error.
com.chordiant.dm.ddc.DataAdapterException: com.ibm.websphere.ce.cm.ConnectionWaitTimeoutException: Connection not available, Timed out waiting for 180001
at com.chordiant.dm.ddc.jdbc.AbstractJDBCAdapter.getConnection(Unknown Source)
at com.chordiant.dm.ddc.ids.QAAdapter.getRecord(Unknown Source)
at com.chordiant.dm.ddc.DataCollector.getRecord(DataCollector.java:144)
at com.kiq.omega.ods.core.PropertyColumnEvaluator.evalInputProperties(Unknown Source)
at com.kiq.omega.ods.core.PropertyColumnEvaluator.generateBean(Unknown Source)
at com.kiq.omega.ods.core.BeanEvaluator.generateBean(Unknown Source)
at com.kiq.omega.ods.ejb.DecisionServiceBean.makeDecision(Unknown Source)
at com.kiq.omega.ods.interfaces.EJSLocalStatelessDecisionService_1c36142d.makeDecision(Unknown Source)
at com.kiq.omega.ods.ejb.DecisionControllerBean.makeDecision(Unknown Source)
at com.kiq.omega.ods.interfaces.EJSLocalStatelessDecisionController_016f0b4b.makeDecision(Unknown Source)
at com.chordiant.dm.ra.service.RTDSService.makeDecision(RTDSService.java:231)
at com.chordiant.dm.ra.service.RTDSService.getDecisionMode(RTDSService.java:424)
at com.chordiant.dm.ra.action.SearchActions.searchCustomer(SearchActions.java:90)
at com.chordiant.dm.ra.action.SearchActions.searchCustomerFromForm(SearchActions.java:126)
at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:266)
at com.chordiant.dm.ra.action.util.DispatchMethodAction.execute(DispatchMethodAction.java:38)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:413)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:225)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:446)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at com.chordiant.dm.ra.action.util.HibernateFilter.doFilter(HibernateFilter.java:37)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:100)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
Caused by: com.ibm.websphere.ce.cm.ConnectionWaitTimeoutException: Connection not available, Timed out waiting for 180001
at com.ibm.ws.rsadapter.AdapterUtil.toSQLException(AdapterUtil.java:1233)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:444)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:400)
... 53 more
Caused by: com.ibm.websphere.ce.j2c.ConnectionWaitTimeoutException: Connection not available, Timed out waiting for 180001
at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1494)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2203)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:846)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:585)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:431)
... 54 more

Looking ahead for a resolution
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30050
    
149

Abhijit,
Welcome to JavaRanch!

Let's start with some common thing:
1) Is the database on a remote machine? If so, can you ping it?
2) Can you connect to the database from the command line?
3) Is the port correct?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Abhijit Akhuj
Greenhorn

Joined: Oct 03, 2008
Posts: 2
Yup,

Database is on remote machine and I can ping that. Port is fine only problem it causing is response time is going beyond 50sec.
[ October 07, 2008: Message edited by: Abhijit Akhuj ]
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

The message says "Waiting for connection". And then there's this, from the stack trace:
[02/10/08 13:43:24:410 BST] 00002756 FreePool E J2CA0045E: Connection not available while invoking method createOrWaitForConnection for resource jdbc/raDataSource.

So my guess is that the DataSource doesn't have any free connections to give out. This could be because you haven't configured a large enough pool, or because there is some code which isn't closing connections properly.
Thangarasu Perumal
Greenhorn

Joined: Jan 04, 2010
Posts: 1
Go to the Data Source which you have used for your application.
Click the link Connection pool properties and increase or set the value of Connection timeout and Maximum connections value depending upon the number of threads is used.

The Connection timeout value is depending upon the Network Speed and Remote Database load and its Memory Configurations.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection Wait Timeout Exception
 
Similar Threads
Uncaught exception thrown in one of the service methods of the servlet
Could not execute batch Update Error in Project
Getting 502 error when opening URLConnection
websphere 6.1 does not support distributed map
Problem with Webservice in IBM WebSphere Server