1 Reply Latest reply on Oct 10, 2009 1:58 PM by Jeff Christy

    Oracle XA datasource problem

    Jeff Christy Newbie

      Hello all,
      I have an application that I am migrating from weblogic to jboss 4.2.3 GA. It makes connections to multiple datasources, and on attempting to aquire a connection to the second datasource, it was throwing this exception: org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object
      So I switched the datasources to XA from local-tx, set com.arjuna.ats.jta.allowMultipleLastResources to "true" in jbossjta-properties.xml, and set my Xid Factory Pad'ing to true in jboss-service.xml.
      But I still get an exception that I can't seem to decipher. Here is the stacktrace:
      2009-10-05 16:33:57,741 ERROR [http-0.0.0.0-80-1] (XAManagedConnection.java:132) - Start transaction failed for org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1e26bd2
      2009-10-05 16:33:57,741 WARN [http-0.0.0.0-80-1] (BaseConnectionManager2.java:744) - Connection error occured: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@aa2ee4[state=NORMAL mc=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1e26bd2 handles=0 lastUse=1254782037709 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@14df53 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@51f266 xaResource=org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper@eca93c txSync=null]
      oracle.jdbc.xa.OracleXAException
      at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1157)
      at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:295)
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:124)
      at org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper.start(JcaXAResourceWrapper.java:113)
      at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:776)
      at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:499)
      at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.enlist(TxConnectionManager.java:788)
      at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:579)
      at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:352)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:524)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:405)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:849)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
      at com.neoforma.common.datasync.jdbc.JDBCAbstractionAdapter.getConnection(JDBCAbstractionAdapter.java:94)
      at com.neoforma.common.datasync.jdbc.JDBCAbstractionAdapter.getResultSet(JDBCAbstractionAdapter.java:487)
      at com.neoforma.common.datasync.jdbc.JDBCAbstractionAdapter.findBy(JDBCAbstractionAdapter.java:343)
      at com.neoforma.common.datasync.DataSyncManager.findBy(DataSyncManager.java:275)
      at com.neoforma.buslayer.contract.common.DAOHelper.readBusObjs(DAOHelper.java:1006)
      at com.neoforma.buslayer.contract.common.DAOHelper.checkContractEligibility(DAOHelper.java:286)
      at com.neoforma.buslayer.contract.hcocontractsetup.impl.HCOContractSetupDAO.readRW(HCOContractSetupDAO.java:165)
      at com.neoforma.buslayer.contract.hcocontractsetup.impl.HCOContractSetupDAO.read(HCOContractSetupDAO.java:112)
      at com.neoforma.apps.cm.facade.impl.ContractSetupBean.getContractSetupDetails(ContractSetupBean.java:110)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
      at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
      at org.jboss.ejb.Container.invoke(Container.java:960)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
      at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
      at $Proxy73.getContractSetupDetails(Unknown Source)
      at com.neoforma.apps.cm.daoactivators.ContractSetupDelegator.getContractSetupDetails(ContractSetupDelegator.java:64)
      at com.neoforma.apps.cm.appsbiz.ContractDetailView.getSetupTierAndDistributionDetails(ContractDetailView.java:167)
      at com.neoforma.apps.cm.actions.ContractDetailViewAction.appExecute(ContractDetailViewAction.java:133)
      at com.neoforma.apps.cm.struts.AppAction.doExecute(AppAction.java:134)
      at com.neoforma.common.struts.NFAction.execute(NFAction.java:33)
      at com.neoforma.common.struts.NFAction$$FastClassByCGLIB$$2dcaa9d2.invoke()
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:661)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
      at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:53)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
      at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:606)
      at com.neoforma.apps.cm.actions.ContractDetailViewAction$$EnhancerByCGLIB$$3867a93.execute()
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
      at com.neoforma.common.struts.NFDelegatingTilesRequestProcessor.process(NFDelegatingTilesRequestProcessor.java:94)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Thread.java:595)


      Here is my XA datasource configuration:

      <xa-datasource>
      <jndi-name>some-data-source</jndi-name>
      <use-java-context>false</use-java-context>
      <isSameRM-override-value>false</isSameRM-override-value>
      <track-connection-by-tx/>
      <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
      <xa-datasource-property name="URL">jdbc:oracle:thin:@somehost:1521:somesid</xa-datasource-property>
      <xa-datasource-property name="User">someuser</xa-datasource-property>
      <xa-datasource-property name="Password">somepassword</xa-datasource-property>
      <no-tx-separate-pools/>
      <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
      <min-pool-size>5</min-pool-size>
      <max-pool-size>100</max-pool-size>
      <idle-timeout-minutes>0</idle-timeout-minutes>
      <!-- <track-statements/> -->
      <!-- <application-managed-security/> -->

      <type-mapping>Oracle9i</type-mapping>

      </xa-datasource>


      Has anyone else been through this issue? Any help would be greatly appreciated - thanks.