java.sql.SQLException: XA error: XAER_PROTO

Discussions

EJB programming & troubleshooting: java.sql.SQLException: XA error: XAER_PROTO

  1. Hi all,
       Can sombody can help me to identify the problem with following exception. I have application running in weblogic5.1. Now i am trying to migrate to weblogic8.1.
    While establishing connection i got following exception.

    java.sql.SQLException: XA error: XAER_PROTO : Routine was invoked in an inproper
     context start() failed on resource 'gmacPool': XAER_PROTO : Routine was invoked
     in an inproper context
    javax.transaction.xa.XAException
            at oracle.jdbc.xa.OracleXAResource.disallowLocalTxnMode(OracleXAResource
    .java:1048)
            at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:15
    3)
            at weblogic.jdbc.wrapper.VendorXAResource.start(VendorXAResource.java:50
    )
            at weblogic.jdbc.jta.DataSource.start(DataSource.java:617)
            at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerReso
    urceInfo.java:1075)
            at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerRe
    sourceInfo.java:1007)
            at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerRes
    ourceInfo.java:203)
            at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(Se
    rverTransactionImpl.java:419)
            at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1287)
            at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1
    250)
            at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:385)
            at weblogic.jdbc.jta.DataSource.connect(DataSource.java:343)
            at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSour
    ce.java:305)
            at com.gmac.mic.uwc.util.DataAccessBean.connect(DataAccessBean.java:100)

            at com.gmac.mic.uwc.ejb.sessionbeans.userprofile.UserProfileSessionBean.
    addOrUpdateRepresentative(UserProfileSessionBean.java:711)
            at com.gmac.mic.uwc.ejb.sessionbeans.userprofile.UserProfileSession_q4gu
    yo_EOImpl.addOrUpdateRepresentative(UserProfileSession_q4guyo_EOImpl.java:424)
            at com.gmac.mic.uwc.controller.UserProfileController.addRepresentative(U
    serProfileController.java:317)
            at com.gmac.mic.uwc.controller.UserProfileController.performTask(UserPro
    fileController.java:140)
            at com.gmac.mic.uwc.controller.UserProfileController.doPost(UserProfileC
    ontroller.java:105)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
    (ServletStubImpl.java:971)
            at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:402)
            at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:305)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:6350)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:317)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    118)
            at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:3635)
            at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:2585)
            at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
            at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

    java.sql.SQLException: XA error: XAER_PROTO : Routine was invoked in an inproper
     context start() failed on resource 'gmacPool': XAER_PROTO : Routine was invoked
     in an inproper context
    javax.transaction.xa.XAException
            at oracle.jdbc.xa.OracleXAResource.disallowLocalTxnMode(OracleXAResource
    .java:1048)
            at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:15
    3)
            at weblogic.jdbc.wrapper.VendorXAResource.start(VendorXAResource.java:50
    )
            at weblogic.jdbc.jta.DataSource.start(DataSource.java:617)
            at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerReso
    urceInfo.java:1075)
            at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerRe
    sourceInfo.java:1007)
            at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerRes
    ourceInfo.java:203)
            at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(Se
    rverTransactionImpl.java:419)
            at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1287)
            at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1
    250)
            at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:385)
            at weblogic.jdbc.jta.DataSource.connect(DataSource.java:343)
            at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSour
    ce.java:305)
            at com.gmac.mic.uwc.util.DataAccessBean.connect(DataAccessBean.java:100)

            at com.gmac.mic.uwc.ejb.sessionbeans.userprofile.UserProfileSessionBean.
    addOrUpdateRepresentative(UserProfileSessionBean.java:711)
            at com.gmac.mic.uwc.ejb.sessionbeans.userprofile.UserProfileSession_q4gu
    yo_EOImpl.addOrUpdateRepresentative(UserProfileSession_q4guyo_EOImpl.java:424)
            at com.gmac.mic.uwc.controller.UserProfileController.addRepresentative(U
    serProfileController.java:317)
            at com.gmac.mic.uwc.controller.UserProfileController.performTask(UserPro
    fileController.java:140)
            at com.gmac.mic.uwc.controller.UserProfileController.doPost(UserProfileC
    ontroller.java:105)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
    (ServletStubImpl.java:971)
            at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:402)
            at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:305)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:6350)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:317)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    118)
            at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:3635)
            at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:2585)
            at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
            at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

            at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1292)
            at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1
    250)
            at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:385)
            at weblogic.jdbc.jta.DataSource.connect(DataSource.java:343)
            at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSour
    ce.java:305)
            at com.gmac.mic.uwc.util.DataAccessBean.connect(DataAccessBean.java:100)

            at com.gmac.mic.uwc.ejb.sessionbeans.userprofile.UserProfileSessionBean.
    addOrUpdateRepresentative(UserProfileSessionBean.java:711)
            at com.gmac.mic.uwc.ejb.sessionbeans.userprofile.UserProfileSession_q4gu
    yo_EOImpl.addOrUpdateRepresentative(UserProfileSession_q4guyo_EOImpl.java:424)
            at com.gmac.mic.uwc.controller.UserProfileController.addRepresentative(U
    serProfileController.java:317)
            at com.gmac.mic.uwc.controller.UserProfileController.performTask(UserPro
    fileController.java:140)
            at com.gmac.mic.uwc.controller.UserProfileController.doPost(UserProfileC
    ontroller.java:105)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
    (ServletStubImpl.java:971)
            at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:402)
            at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:305)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:6350)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:317)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    118)
            at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:3635)
            at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:2585)
            at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
            at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    com.gmac.mic.uwc.exception.UserProfileException
            at com.gmac.mic.uwc.ejb.sessionbeans.userprofile.UserProfileSessionBean.
    addOrUpdateRepresentative(UserProfileSessionBean.java:784)
            at com.gmac.mic.uwc.ejb.sessionbeans.userprofile.UserProfileSession_q4gu
    yo_EOImpl.addOrUpdateRepresentative(UserProfileSession_q4guyo_EOImpl.java:424)
            at com.gmac.mic.uwc.controller.UserProfileController.addRepresentative(U
    serProfileController.java:317)
            at com.gmac.mic.uwc.controller.UserProfileController.performTask(UserPro
    fileController.java:140)
            at com.gmac.mic.uwc.controller.UserProfileController.doPost(UserProfileC
    ontroller.java:105)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
    (ServletStubImpl.java:971)
            at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:402)
            at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:305)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:6350)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:317)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    118)
            at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:3635)
            at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:2585)
            at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
            at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    Got connection[weblogic.jdbc.wrapper.JTAConnection_weblogic_jdbc_wrapper_XAConne
    ction_oracle_jdbc_driver_OracleConnection-gmacPool-3, oracle.jdbc.driver.OracleC
    onnection@47bebb]
    stmtweblogic.jdbc.wrapper.Statement_oracle_jdbc_driver_OracleStatement@9
    isConnectedtrue

    regards
    Lakshman

    Threaded Messages (2)

  2. XA proto[ Go to top ]

    Are you still experiencing that problem, if you solved it, how?
  3. JDBC driver[ Go to top ]

    We resolved the issue by upgrading to the latest JDBC. We were running JDBC 3.2 and upgraded to 3.4 and most of the XA error went away. It seems that the new drivers have a much better handle to XA connectivity and performance are much better. Upgrade the Weblogic Driver and also look for XA issues at the weblogic support site. http://support.bea.com