aspose file tools
The moose likes JDBC and Relational Databases and the fly likes No ManagedConnections available within configured blocking timeout ( 5000 [ms] ) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "No ManagedConnections available within configured blocking timeout ( 5000 [ms] )" Watch "No ManagedConnections available within configured blocking timeout ( 5000 [ms] )" New topic
Author

No ManagedConnections available within configured blocking timeout ( 5000 [ms] )

Farooq Ahmed
Greenhorn

Joined: Nov 02, 2004
Posts: 2
Hi,

Can anybody help me to solve this problem,

I have deployed an applcation on jobss server. The application calls a service (a java thread program) for every 1 minute. The service creates a connection using jboss server datasource and closes after accessing the database. Iam getting the following exception when the application is running

org.jboss.util.NestedSQLException: No ManagedConnections available within configured blocking timeout ( 5000 [ms] ); - nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 5000 [ms] ))
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:106)
at j2ee.J2EEService.getConnection(J2EEService.java:159)
at db.DAO.getConnection(DAO.java:107)
at app.ServiceFile.run(ServiceFile.java:41)
at java.lang.Thread.run(Thread.java:536)
Caused by: javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 5000 [ms] )
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:249)
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:529)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:442)
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:312)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:494)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:848)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
... 5 more

The following are the settings i have made in oracle-ds.xml file
<datasources>
<local-tx-datasource>
<jndi-name>OracleDS</jndi-name>
<connection-url>jdbc racle:thin:@172.20.10.84:1521 MASS</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>CI</user-name>
<password>CI</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
</local-tx-datasource>
<depends optional-attribute-name="ManagedConnectionFactoryName">
<mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=OracleDS">
<attribute name="MinSize">5</attribute>
<attribute name="MaxSize">50</attribute>
<attribute name="BlockingTimeoutMillis">60000</attribute>
<attribute name="IdleTimeoutMinutes">15</attribute>
<attribute name="Criteria">ByContainer</attribute>
</mbean>
</depends>
</datasources>
Shashank Hiwarkar
Ranch Hand

Joined: Feb 17, 2002
Posts: 32
Which version of JBoss you are using. NoManaggedConnection is not the error of any database, this is connection pool exception which is managed by Application Server.

I will suggest to use JBoss3.2.6


Regards,
Shashank P Hiwarkar


Shashank Hiwarkar<br />SCJP, SCWCD
Farooq Ahmed
Greenhorn

Joined: Nov 02, 2004
Posts: 2
Hi Shashank, thanks a lot for ur reply.

Iam using jboss-3.2.4RC1. I can't change it to JBoss3.2.6. Our application is going to be deployed on that version itself. Anyother solution please let me know.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: No ManagedConnections available within configured blocking timeout ( 5000 [ms] )
 
It's not a secret anymore!