4 Replies Latest reply: Jun 7, 2012 1:08 PM by 941279 RSS

    Adding archived-real-path-enabled caused Cannot obtain XAConnection

    941279
      I am migrating a web application from Tomcat 6.x to Weblogic 10.3.5. Because some features rely on reading the real path of the resources, and the returnRealPath() returns NULL on weblogic, so I added <wls:show-archived-real-path-enabled>true</wls:show-archived-real-path-enabled> in the application's weblogic.xml and tried to re-deploy. The deployment failed with following stack trace. However, before I added this entry into weblogic.xml , the deployment is successful.

      <Jun 1, 2012 4:55:35 PM EDT> <Warning> <netuix> <BEA-423420> <Redirect is execut
      ed in begin or refresh action. Redirect url is /console/console.portal?_nfpb=tru
      e&_pageLabel=JdbcDatasourcesJDBCDataSourceMonitorTestingPage.>
      Setting up initial data source (DataSource)ic.lookup('jdbc/nimscastds');
      calling initializeCurrentConnection dataSource.getConnection()
      Returned from init. Now should get dataSource.getConnection()
      Got dataSource.getConnection()
      java.sql.SQLException: Internal error: Cannot obtain XAConnection weblogic.commo
      n.resourcepool.ResourceLimitException: No resources currently available in pool
      NIMSCastDS to allocate to applications, please increase the size of the pool and
      retry..
      at weblogic.common.resourcepool.ResourcePoolImpl.reserveResourceInternal
      (ResourcePoolImpl.java:577)
      at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(Resourc
      ePoolImpl.java:342)
      at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(Resourc
      ePoolImpl.java:329)
      at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.j
      ava:417)
      at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.j
      ava:324)
      at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(Connectio
      nPoolManager.java:94)
      at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(Connectio
      nPoolManager.java:63)
      at weblogic.jdbc.jta.DataSource.getXAConnectionFromPool(DataSource.java:
      1677)
      at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1
      475)
      at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:446)
      at weblogic.jdbc.jta.DataSource.connect(DataSource.java:403)
      at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSour
      ce.java:364)
      at gov.fema.web.nimcast.PoolManager.currentConnection(PoolManager.java:1
      78)
      at gov.fema.web.nimcast.dao.BaseDao.select(BaseDao.java:106)
      at gov.fema.web.nimcast.dao.BaseDao.select(BaseDao.java:94)
      at gov.fema.web.nimcast.dao.MetricsOptionDao.cacheAll(MetricsOptionDao.j
      ava:138)
      at gov.fema.web.nimcast.dao.MetricsSectionDao.cacheMetricsObjects(Metric
      sSectionDao.java:259)
      at gov.fema.web.nimcast.InitServlet.initNimscast(InitServlet.java:112)
      at gov.fema.web.nimcast.InitServlet.init(InitServlet.java:46)
      at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(St
      ubSecurityHelper.java:283)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
      dSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
      120)
      at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecuri
      tyHelper.java:64)
      at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubL
      ifecycleHelper.java:58)
      at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHel
      per.java:48)
      at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
      mpl.java:539)
      at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppS
      ervletContext.java:1985)
      at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(
      WebAppServletContext.java:1959)
      at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAp
      pServletContext.java:1878)
      at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletCon
      text.java:3153)
      at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.jav
      a:1508)
      at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleSta
      teDriver.java:425)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
      river.java:52)
      at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStat
      eDriver.java:119)
      at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedMod
      uleDriver.java:200)
      at weblogic.application.internal.flow.ModuleListenerInvoker.start(Module
      ListenerInvoker.java:247)
      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleSta
      teDriver.java:425)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
      river.java:52)
      at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStat
      eDriver.java:119)
      at weblogic.application.internal.flow.StartModulesFlow.activate(StartMod
      ulesFlow.java:27)
      at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.ja
      va:636)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
      river.java:52)
      at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.
      java:205)
      at weblogic.application.internal.SingleModuleDeployment.activate(SingleM
      oduleDeployment.java:43)
      at weblogic.application.internal.DeploymentStateChecker.activate(Deploym
      entStateChecker.java:161)
      at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(Ap
      pContainerInvoker.java:79)
      at weblogic.deploy.internal.targetserver.operations.AbstractOperation.ac
      tivate(AbstractOperation.java:569)
      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.ac
      tivateDeployment(ActivateOperation.java:150)
      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.do
      Commit(ActivateOperation.java:116)
      at weblogic.deploy.internal.targetserver.operations.AbstractOperation.co
      mmit(AbstractOperation.java:323)
      at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploym
      entCommit(DeploymentManager.java:844)
      at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeplo
      ymentList(DeploymentManager.java:1253)
      at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(
      DeploymentManager.java:440)
      at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.com
      mit(DeploymentServiceDispatcher.java:163)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb
      ackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb
      ackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb
      ackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
      at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTunin
      gWorkManagerImpl.java:528)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
      at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1
      484)
      at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:446)
      at weblogic.jdbc.jta.DataSource.connect(DataSource.java:403)
      at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSour
      ce.java:364)
      at gov.fema.web.nimcast.PoolManager.currentConnection(PoolManager.java:1
      78)
      at gov.fema.web.nimcast.dao.BaseDao.select(BaseDao.java:106)
      at gov.fema.web.nimcast.dao.BaseDao.select(BaseDao.java:94)
      at gov.fema.web.nimcast.dao.MetricsOptionDao.cacheAll(MetricsOptionDao.j
      ava:138)
      at gov.fema.web.nimcast.dao.MetricsSectionDao.cacheMetricsObjects(Metric
      sSectionDao.java:259)
      at gov.fema.web.nimcast.InitServlet.initNimscast(InitServlet.java:112)
      at gov.fema.web.nimcast.InitServlet.init(InitServlet.java:46)
      at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(St
      ubSecurityHelper.java:283)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
      dSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
      120)
      at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecuri
      tyHelper.java:64)
      at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubL
      ifecycleHelper.java:58)
      at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHel
      per.java:48)
      at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
      mpl.java:539)
      at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppS
      ervletContext.java:1985)
      at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(
      WebAppServletContext.java:1959)
      at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAp
      pServletContext.java:1878)
      at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletCon
      text.java:3153)
      at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.jav
      a:1508)
      at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleSta
      teDriver.java:425)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
      river.java:52)
      at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStat
      eDriver.java:119)
      at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedMod
      uleDriver.java:200)
      at weblogic.application.internal.flow.ModuleListenerInvoker.start(Module
      ListenerInvoker.java:247)
      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleSta
      teDriver.java:425)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
      river.java:52)
      at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStat
      eDriver.java:119)
      at weblogic.application.internal.flow.StartModulesFlow.activate(StartMod
      ulesFlow.java:27)
      at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.ja
      va:636)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
      river.java:52)
      at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.
      java:205)
      at weblogic.application.internal.SingleModuleDeployment.activate(SingleM
      oduleDeployment.java:43)
      at weblogic.application.internal.DeploymentStateChecker.activate(Deploym
      entStateChecker.java:161)
      at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(Ap
      pContainerInvoker.java:79)
      at weblogic.deploy.internal.targetserver.operations.AbstractOperation.ac
      tivate(AbstractOperation.java:569)
      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.ac
      tivateDeployment(ActivateOperation.java:150)
      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.do
      Commit(ActivateOperation.java:116)
      at weblogic.deploy.internal.targetserver.operations.AbstractOperation.co
      mmit(AbstractOperation.java:323)
      at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploym
      entCommit(DeploymentManager.java:844)
      at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeplo
      ymentList(DeploymentManager.java:1253)
      at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(
      DeploymentManager.java:440)
      at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.com
      mit(DeploymentServiceDispatcher.java:163)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb
      ackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb
      ackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb
      ackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
      at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTunin
      gWorkManagerImpl.java:528)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
        • 1. Re: Adding archived-real-path-enabled caused Cannot obtain XAConnection
          vladodias
          Hi,

          I think it's very unlikely that the "show-archived-real-path-enabled" have some relation with the data source problem.

          The pool is getting exhausted: "No resources currently available in pool NIMSCastDS to allocate to applications".

          I guess you have some servlet (InitServlet) being initialised and using the more connections than the pool can give.

          You can try and increase the "Maximum Capacity" of NIMSCastDS connection pool in the Admin Console.

          Cheers,
          Vlad

          If you think this is helpful, please consider giving points - it is good etiquette to reward an answerer points (5 - helpful; 10 - correct) for their post if they answer your question.
          • 2. Re: Adding archived-real-path-enabled caused Cannot obtain XAConnection
            941279
            Vlad,

            Thanks for your reply. First, I even couldn't beleive that adding this entry to weblogic.xml has relationship to the DataSource issues. After I increase the "Maximum Capacity" of NIMSCastDS connection pool in the Admin Console, actually I increased it to 200 and I re-started the Weblogic server and tried to deploy the applicaiton from the scratch, and it was still hanging there for around 5 minutes and finally threw out that XAConnection exception. However, if I removed that entry from Weblogic.xml , the deployment is OK.
            • 3. Re: Adding archived-real-path-enabled caused Cannot obtain XAConnection
              vladodias
              I'm still not convinced that archived-real-path-enabled has something to do with the issue.
              938276 wrote:
              at gov.fema.web.nimcast.PoolManager.currentConnection(PoolManager.java:1
              78)
              at gov.fema.web.nimcast.dao.BaseDao.select(BaseDao.java:106)
              at gov.fema.web.nimcast.dao.BaseDao.select(BaseDao.java:94)
              at gov.fema.web.nimcast.dao.MetricsOptionDao.cacheAll(MetricsOptionDao.j
              ava:138)
              at gov.fema.web.nimcast.dao.MetricsSectionDao.cacheMetricsObjects(Metric
              sSectionDao.java:259)
              at gov.fema.web.nimcast.InitServlet.initNimscast(InitServlet.java:112)
              at gov.fema.web.nimcast.InitServlet.init(InitServlet.java:46)
              Do you have access to this code? I would look into this and search for a possible bug that wouldn't manifest on Tomcat but does in Weblogic... Maybe connections being created but not released... I would suspect on -- PoolManager.java:178 and MetricsOptionDao.java:138 ...
              Or maybe the connection expiration timeout is lower on Tomcat than on Weblogic...

              Hope that helps.

              Cheers,
              Vlad

              If you think this is helpful, please consider giving points - it is good etiquette to reward an answerer points (5 - helpful; 10 - correct) for their post if they answer your question.
              • 4. Re: Adding archived-real-path-enabled caused Cannot obtain XAConnection
                941279
                Thanks, the poolmanger has leak, not releasing the problem. Your points are so valuable to me!