4 Replies Latest reply on May 16, 2005 2:25 PM by Rodrigo Baptista

    No ManagedConnections available

    chakrapani prakhya Newbie

      i am using jboss-3.2.4 with Oracle9i database.my Oracle-ds.xml is
      and MY PROBLEM IS after some time accesing my application,my oracle connection fails.and in my server i am getting error like

      jvm 1 [STDOUT] Database error at createConnection:
      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] ))

      this my problem,
      can any one help me to solve this problem.

        • 1. Re: No ManagedConnections available
          Santosh Korde Newbie

          Hi you need to increase the value of block out time from 30000 to say 70000
          <blocking-timeout-millis >30000 </blocking-timeout-millis >
          Another thing is make sure you are closing all connections in the custom code you have written

          • 2. Re: No ManagedConnections available and Connections are not
            kashi ram Newbie


            I am also getting the same problem. I am using Jboss 3.2.3 and Postgresql 8.0 windows version. I found that connections are not getting closed or they are returned to pool even though my code is seems to be right. Ultimately all connections are open and finally i need to restart the jboss. I am writing the code for getting connection like this:

            import java.sql.Connection;
            import javax.naming.InitialContext;
            import javax.naming.Context;
            import javax.naming.NamingException;
            import javax.sql.DataSource;

            public class DBConnection{

            static javax.sql.DataSource DataSrc = null;
            static SQLQueryProperties sqlQueryObj = null;
            static int no_connections=0;

            sqlQueryObj = SQLQueryProperties.getInstance();
            DataSrc = (DataSource)sqlQueryObj.getContext().lookup(sqlQueryObj.getProperty("DataSourceJNDI"));
            catch(Exception e)

            public DBConnection() throws Exception

            public Connection getDBConnection() throws Exception
            Connection cn=DataSrc.getConnection();
            return cn;

            public Connection getConnection() throws Exception
            Connection cn=DataSrc.getConnection();
            return cn;
            public void returnDBConnection(Connection con) throws Exception
            if(!con.isClosed()) {con.close(); no_connections--;}

            public void returnConnection(Connection con) throws Exception
            System.out.println("NO OF CONNECTIONS OPENED IS :"+no_connections);

            if(!con.isClosed()) {con.close(); no_connections--;}
            System.out.println("AFTER CLOSE NO OF CONNECTIONS REMAINED IS :"+no_connections);

            public static int countConnections(){
            return no_connections;


            There is some piece of code to count the no of connections open and closed. And my postgres-ds.xml is like this:



            I don't what to do to close the opened connections. Because of this i am facing a lot of problem in development environment.

            Please let me know what should i do to get rid of this problem.

            Thanks and Regards

            • 3. Re: No ManagedConnections available
              Ulf Schroeter Novice

              Upgrade to at least 3.2.6 as all previous JBoss versions have a connection leak bug within the ManagedConnectionPool code.


              • 4. Re: No ManagedConnections available
                Rodrigo Baptista Newbie


                I cannot do an upgrade in my jboss (3.0.4), is there any patch to solve the connection leak bug?