1 Reply Latest reply: May 11, 2012 12:12 AM by Arunbodap-Oracle RSS

    java.sql.SQLException: Internal error: Cannot obtain XAConnection

    SUHELFIRDUS
      Hi,


      I am getting this error .
      I have a multi data source which serves two Data source and is using load balancing
      I get the below error:

      Cannot obtain XAConnection weblogic.common.ResourceException: No good connections available.

      The complete error trace is below:

      GWMDBBean [onMessage(Message)] 09_MAY 16:24:13:165->EXCEPTION

      java.sql.SQLException: Internal error: Cannot obtain XAConnection weblogic.common.ResourceException: No good connections available.
           at weblogic.jdbc.common.internal.MultiPool.findPool(MultiPool.java:187)
           at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:87)
           at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:61)
           at weblogic.jdbc.jta.DataSource.getXAConnectionFromPool(DataSource.java:1514)
           at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1301)
           at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:426)
           at weblogic.jdbc.jta.DataSource.connect(DataSource.java:383)
           at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:346)
           at com.iflex.fcubs.gwutil.db.GWDBUtil.getConnection(GWDBUtil.java:119)
           at com.iflex.fcubs.gwservices.db.GWMsgProcessor.getConnection(GWMsgProcessor.java:95)
           at com.iflex.fcubs.gwservices.db.inbound.GWMsgSchemaProc.processMsg(GWMsgSchemaProc.java:165)
           at com.iflex.fcubs.gw.mdb.GWMDBBean.processMessage(GWMDBBean.java:1051)
           at com.iflex.fcubs.gw.mdb.GWMDBBean.onMessage(GWMDBBean.java:371)
           at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
           at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371)
           at weblogic.ejb.container.internal.NewJMSMessagePoller.processOneMessage(NewJMSMessagePoller.java:245)
           at weblogic.ejb.container.internal.NewJMSMessagePoller.run(NewJMSMessagePoller.java:121)
           at weblogic.ejb.container.internal.NewJMSMessagePoller.timerExpired(NewJMSMessagePoller.java:204)
           at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:273)
           at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
           at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

           at com.iflex.fcubs.gw.mdb.GWMDBBean.processMessage(GWMDBBean.java:1060)
           at com.iflex.fcubs.gw.mdb.GWMDBBean.onMessage(GWMDBBean.java:371)
           at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
           at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371)
           at weblogic.ejb.container.internal.NewJMSMessagePoller.processOneMessage(NewJMSMessagePoller.java:245)
           at weblogic.ejb.container.internal.NewJMSMessagePoller.run(NewJMSMessagePoller.java:121)
           at weblogic.ejb.container.internal.NewJMSMessagePoller.timerExpired(NewJMSMessagePoller.java:204)
           at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:273)
           at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
           at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)



      The Data Sources Configuration are as below:

      <initial-capacity>15</initial-capacity>
      <max-capacity>15</max-capacity>
        • 1. Re: java.sql.SQLException: Internal error: Cannot obtain XAConnection
          Arunbodap-Oracle
          This indicates that none of your datasources have been able to successfully connect to the database.
          Please check the connectivity to your database from the datasources.

          Also, you can login into the console and check if the connections are good, by doing test connection on the datasource.
          http://docs.oracle.com/cd/E21764_01/apirefs.1111/e13952/taskhelp/jdbc/jdbc_datasources/TestDataSources.html
          The error you get when you do test connection will help you to understand any connectivity issues.


          Arun