8 Replies Latest reply on Sep 23, 2016 3:29 PM by rameshmunagala

    IJ000453: Unable to get managed connection for

    joselopesdacruz

      Hello,

       

      I'm migrating weblogic apps to jboss. Everything was working fine until I started some tests using datasources to Oracle.

      I make 3-5 calls do database in 7-10 second interval and the error its always the same:

       

      IJ000453: Unable to get managed connection for java:/mydatasource

       

      I've searched web, foruns for a while and it seems to indicate a jboss bug?

       

      please help, its a stopper problem!

       

      My datasource config below

       

      <datasource jta="false" jndi-name="java:/provisioning2DS" pool-name="provisioning2DS" enabled="true" use-ccm="false">

           <connection-url>jdbc:oracle:thin:@10.131.196.168:1523/qcibof</connection-url>

           <driver-class>oracle.jdbc.OracleDriver</driver-class>

           <driver>OracleJDBCDriver</driver>

           <pool>

             <min-pool-size>10</min-pool-size>

             <max-pool-size>30</max-pool-size>

             <prefill>true</prefill>

             <use-strict-min>false</use-strict-min>

           </pool>

           <timeout>

             <idle-timeout-minutes>30000</idle-timeout-minutes>

           </timeout>

           <security>

               <user-name>provisioning2</user-name>

               <password>provisioning2#01</password>

           </security>

           <validation>

               <validate-on-match>false</validate-on-match>

               <background-validation>false</background-validation>

           </validation>

           <statement>

               <share-prepared-statements>false</share-prepared-statements>

           </statement>

      </datasource>

        • 1. Re: IJ000453: Unable to get managed connection for
          wdfink

          Jose Cruz wrote:

           

          IJ000453: Unable to get managed connection for java:/mydatasource

           

          My datasource config below

           

          <datasource jta="false" jndi-name="java:/provisioning2DS" pool-name="provisioning2DS" enabled="true" use-ccm="false">

           

          mydatasource does not match provisioning2DS, are you sure that the configuration is correct.

          Also AFAIR the jndi-name is restricted to a prefix, you should read the datasource configuration manual

          • 2. Re: IJ000453: Unable to get managed connection for
            joselopesdacruz

            Thanks for the reply.

             

            The java:/mydatasource was just to text, the configuration is java:/provisioning2DS.

            My configuration works for abount 40-50 seconds, then it starts the error.

             

            José Cruz

            • 3. Re: IJ000453: Unable to get managed connection for
              wdfink

              What is the exact error message?

              And what version of JBoss do you use?

              • 4. Re: IJ000453: Unable to get managed connection for
                joselopesdacruz

                below de stacktrace

                 

                <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

                   <soap:Body>

                      <ns2:ConsumeProductResponse xmlns:ns2="http://services.provisioning.globalimagens.controlinveste.pt">

                         <GIPAvailableProvisioningResultTOResult>

                            <errorMessage>pt.controlinveste.pce.provisioningto.exceptions.ProvisioningException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/provisioning2DS

                    at pt.controlinveste.pce.provisioningbusiness.business.sessionbeans.ProvisioningUpdate12EJBBean.consumeProvisioning(ProvisioningUpdate12EJBBean.java:480)

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                    at java.lang.reflect.Method.invoke(Method.java:601)

                    at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)

                    at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                    at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:202)

                    at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:306)

                    at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:190)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:80)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                    at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)

                    at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:179)

                    at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:179)

                    at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:43)

                    at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)

                    at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:128)

                    at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)

                    at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)

                    at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)

                    at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)

                    at $Proxy182.consumeProvisioning(Unknown Source)

                    at pt.controlinveste.globalimagens.provisioning.sessionbeans.GlobalImagensProvisioningFacade.consumeProduct(GlobalImagensProvisioningFacade.java:527)

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                    at java.lang.reflect.Method.invoke(Method.java:601)

                    at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)

                    at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                    at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:228)

                    at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:304)

                    at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:190)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)

                    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                    at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)

                    at org.jboss.as.webservices.invocation.AbstractInvocationHandlerEJB.invoke(AbstractInvocationHandlerEJB.java:112)

                    at org.jboss.wsf.stack.cxf.JBossWSInvoker._invokeInternal(JBossWSInvoker.java:181)

                    at org.jboss.wsf.stack.cxf.JBossWSInvoker.invoke(JBossWSInvoker.java:127)

                    at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)

                    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

                    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

                    at java.util.concurrent.FutureTask.run(FutureTask.java:166)

                    at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)

                    at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)

                    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)

                    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)

                    at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)

                    at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:91)

                    at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:169)

                    at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)

                    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)

                    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108)

                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)

                    at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)

                    at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140)

                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

                    at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)

                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

                    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

                    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

                    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

                    at java.lang.Thread.run(Thread.java:722)

                Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/provisioning2DS

                    at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:137)

                    at pt.controlinveste.pce.provisioningdao.daos.oracle.OracleProvisioningMasterDAOHelper.buildPLSQLAttributesArray(OracleProvisioningMasterDAOHelper.java:76)

                    at pt.controlinveste.pce.provisioningdao.daos.oracle.OracleProvisioningMasterDAO.consumeProvisioning(OracleProvisioningMasterDAO.java:368)

                    at pt.controlinveste.pce.provisioningbusiness.business.sessionbeans.ProvisioningUpdate12EJBBean.consumeProvisioning(ProvisioningUpdate12EJBBean.java:477)

                    ... 115 more

                Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/provisioning2DS

                    at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:390)

                    at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:302)

                    at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)

                    at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:129)

                    ... 118 more

                Caused by: javax.resource.ResourceException: IJ000658: Unexpected throwable while trying to create a connection: null

                    at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:371)

                    at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397)

                    at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365)

                    at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329)

                    ... 121 more

                Caused by: javax.resource.ResourceException: Could not create connection

                    at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:277)

                    at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:235)

                    at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:761)

                    at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:343)

                    ... 124 more

                Caused by: java.sql.SQLRecoverableException: IO Error: Got minus one from a read call

                    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:419)

                    at oracle.jdbc.driver.PhysicalConnection.&lt;init>(PhysicalConnection.java:536)

                    at oracle.jdbc.driver.T4CConnection.&lt;init>(T4CConnection.java:228)

                    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)

                    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)

                    at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:249)

                    ... 127 more

                Caused by: oracle.net.ns.NetException: Got minus one from a read call

                    at oracle.net.ns.Packet.receive(Packet.java:286)

                    at oracle.net.ns.NSProtocol.connect(NSProtocol.java:287)

                    at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1054)

                    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:308)

                    ... 132 more</errorMessage>

                            <result>0</result>

                            <success>false</success>

                            <allowedOrConsumed>false</allowedOrConsumed>

                         </GIPAvailableProvisioningResultTOResult>

                      </ns2:ConsumeProductResponse>

                   </soap:Body>

                </soap:Envelope>

                • 5. Re: IJ000453: Unable to get managed connection for
                  wdfink

                  Looks very deep inside the Oracle driver.

                   

                  What JBoss version do you use? you should have a look to the connection pool whether there is a leak (look for the maxConnectionInUse counter or the connectionInUse).

                  Maybe you have issues with the number of connections.

                   

                  Do you see the error if you use requestion in parallel or also if you do it in sequence (i.e. after X calls)

                  • 6. Re: IJ000453: Unable to get managed connection for
                    joselopesdacruz

                    - The Oracle driver its from Oracle and works very well in weblogic 10.3.3.

                    - My jboss 7.1.1

                    - To reproduce the error, I just simple call in sequence a web service 5-7 times in intervals of 7 seconds, and this web service just opens a connection to Oracle and returns some values. Thats it.

                    • 7. Re: IJ000453: Unable to get managed connection for
                      joselopesdacruz

                      Hello,

                       

                      the problem was related with Oracle Nested Tables as stored procedure parameters. For each Table Type parameter the java api opens a connection to database. I still dont know why the connection pool aparently depleted all the connections, but after I transformed the nested table types to xml in the parameters (know I have varchar2 instead of table type), the access was much faster (about 100x, seriously!) and the problem disappeared.

                       

                      thanks anyway,

                      José Cruz

                      • 8. Re: IJ000453: Unable to get managed connection for
                        rameshmunagala

                        Hi Jose

                         

                        Could you please provide the sample store procedure with table type and xml in parameter and how it is resolve in support of the answered.

                         

                        "the problem was related with Oracle Nested Tables as stored procedure parameters. For each Table Type parameter the java api opens a connection to database. I still dont know why the connection pool aparently depleted all the connections, but after I transformed the nested table types to xml in the parameters (know I have varchar2 instead of table type),"

                         

                        I could not understand "transformed the nested table types to xml in the parameters".. could you please explain with example..

                         

                        Appreciate your support / assistance in this regard!! Thank you !!!