I am using an Oracle jdbc 8.1.7, but I also tried with a jdbc driver 9.0.2 and I got the same result. I am using exactly the same driver in both Linux and Windows installations and I am accessing to the same database. It is strange that it works for Windows and it doesn't for Linux. I also use the same driver for a WebSphere port of my application and it works in both Linux and Windows.
I suspect i configured something wrong in Linux, but I can't figure out what since the only datasource related configuration I did in Windows was the datasource.
I also looked at the embedded exception trace and I found that:
2004-05-06 11:02:52,992 WARN [org.jboss.tm.TransactionImpl] xa error: -4 (The XID is not valid.); oracle error: 24756; oracle sql error: 0;
oracle.jdbc.xa.OracleXAException
at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1157)
at oracle.jdbc.xa.client.OracleXAResource.end(OracleXAResource.java:450)
at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.end(XAManagedConnection.java:156)
at org.jboss.tm.TransactionImpl.endResource(TransactionImpl.java:1205)
at org.jboss.tm.TransactionImpl.endResources(TransactionImpl.java:1278)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:355)
at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:398)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:277)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
at org.jboss.ejb.Container.invoke(Container.java:700)
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:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45)
at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:100)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
at $Proxy196.loadOwnUser(Unknown Source)
at com.nte.anthema.presentation.AnthemaController.setAttributes(AnthemaController.java:70)
at com.nte.anthema.framework.presentation.Controller.doTask(Controller.java:87)
at com.nte.anthema.framework.presentation.Controller.doGet(Controller.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:553)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:197)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
at java.lang.Thread.run(Thread.java:534)
I also enabled the traces for the Transaction Manager and I get the following output:
2004-05-06 11:02:52,474 TRACE [org.jboss.tm.TransactionImpl] enlistResource(): Entered, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=basictest.e-mm.com//21, BranchQual=] status=STATUS_ACTIVE
2004-05-06 11:02:52,474 TRACE [org.jboss.tm.TransactionImpl] startResource(XidImpl [FormatId=257, GlobalId=basictest.e-mm.com//21, BranchQual=1]) entered: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@333b2e flags=0
2004-05-06 11:02:52,887 TRACE [org.jboss.tm.TransactionImpl] startResource(XidImpl [FormatId=257, GlobalId=basictest.e-mm.com//21, BranchQual=1]) leaving: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@333b2e flags=0
2004-05-06 11:02:52,887 TRACE [org.jboss.tm.TransactionImpl] registerSynchronization(): Entered, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=basictest.e-mm.com//21, BranchQual=] status=STATUS_ACTIVE
2004-05-06 11:02:52,892 DEBUG [com.nte.anthema.framework.persistence.Persistor] Got connection for dev_anthema
2004-05-06 11:02:52,942 TRACE [org.jboss.tm.TxManager] suspended tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=basictest.e-mm.com//21, BranchQual=]
2004-05-06 11:02:52,942 TRACE [org.jboss.tm.TxManager] resumed tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=basictest.e-mm.com//21, BranchQual=]
2004-05-06 11:02:52,942 TRACE [org.jboss.tm.TransactionImpl] Committing, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=basictest.e-mm.com//21, BranchQual=], status=STATUS_ACTIVE
2004-05-06 11:02:52,943 TRACE [org.jboss.tm.TransactionImpl] calling sync 0, org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TxRemover@b05cd7
2004-05-06 11:02:52,943 TRACE [org.jboss.tm.TransactionImpl] Before completion done, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=basictest.e-mm.com//21, BranchQual=], status=STATUS_ACTIVE
2004-05-06 11:02:52,943 TRACE [org.jboss.tm.TransactionImpl] endresources(0): state=1
2004-05-06 11:02:52,943 TRACE [org.jboss.tm.TransactionImpl] endResource(XidImpl [FormatId=257, GlobalId=basictest.e-mm.com//21, BranchQual=1]) entered: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@333b2e flag=67108864
2004-05-06 11:02:52,972 TRACE [org.jboss.tm.TransactionImpl] endResource(XidImpl [FormatId=257, GlobalId=basictest.e-mm.com//21, BranchQual=1]) leaving: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@333b2e flag=67108864
2004-05-06 11:02:52,972 WARN [org.jboss.tm.TransactionImpl] XAException: tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=basictest.e-mm.com//21, BranchQual=] errorCode=XAER_NOTA
oracle.jdbc.xa.OracleXAException
at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1157)
at oracle.jdbc.xa.client.OracleXAResource.end(OracleXAResource.java:450)
at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.end(XAManagedConnection.java:156)
at org.jboss.tm.TransactionImpl.endResource(TransactionImpl.java:1205)
Later on I see the following output:
2004-05-06 11:02:52,992 WARN [org.jboss.tm.TransactionImpl] xa error: -4 (The XID is not valid.); oracle error: 24756; oracle sql error: 0;
oracle.jdbc.xa.OracleXAException
at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1157)
at oracle.jdbc.xa.client.OracleXAResource.end(OracleXAResource.java:450)
at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.end(XAManagedConnection.java:156)
I've searched information about this error code, but I couldn'd find anything.
P.