Bug 981174 - javax.transaction.xa.XAException thrown when using JTS transactions
javax.transaction.xa.XAException thrown when using JTS transactions
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: EJB (Show other bugs)
6.1.0
All All
high Severity high
: ER4
: EAP 6.1.1
Assigned To: Ivo Studensky
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-04 04:05 EDT by Tom Ross
Modified: 2013-09-16 16:28 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-16 16:28:32 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
server errors after the client run (17.92 KB, text/plain)
2013-07-08 10:04 EDT, Tom Ross
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker WFLY-1362 Major Resolved javax.transaction.xa.XAException thrown when using JTS transactions 2017-07-10 06:58 EDT

  None (edit)
Description Tom Ross 2013-07-04 04:05:21 EDT
When running the quick start ejb-multi-server example with JTS transactions the following exception is thrown:
11:21:01,462 ERROR [stderr] (RequestProcessor-5) javax.transaction.xa.XAException
11:21:01,462 ERROR [stderr] (RequestProcessor-5)     at com.arjuna.ats.internal.jta.transaction.jts.jca.XATerminatorImple.recover(XATerminatorImple.java:238)
11:21:01,462 ERROR [stderr] (RequestProcessor-5)     at org.jboss.as.ejb3.remote.protocol.versionone.XidTransactionManagementTask.tryRecoveryForImportedTransaction(XidTransactionManagementTask.java:109)
11:21:01,463 ERROR [stderr] (RequestProcessor-5)     at org.jboss.as.ejb3.remote.protocol.versionone.XidTransactionCommitTask.manageTransaction(XidTransactionCommitTask.java:62)
11:21:01,463 ERROR [stderr] (RequestProcessor-5)     at org.jboss.as.ejb3.remote.protocol.versionone.XidTransactionManagementTask.run(XidTransactionManagementTask.java:68)
11:21:01,463 ERROR [stderr] (RequestProcessor-5)     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
11:21:01,463 ERROR [stderr] (RequestProcessor-5)     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
11:21:01,463 ERROR [stderr] (RequestProcessor-5)     at java.util.concurrent.FutureTask.run(FutureTask.java:166)
11:21:01,464 ERROR [stderr] (RequestProcessor-5)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
11:21:01,464 ERROR [stderr] (RequestProcessor-5)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
11:21:01,464 ERROR [stderr] (RequestProcessor-5)     at java.lang.Thread.run(Thread.java:722)
11:21:01,464 ERROR [stderr] (RequestProcessor-5)     at org.jboss.threads.JBossThread.run(JBossThread.java:122)
11:21:01,464 ERROR [stderr] (RequestProcessor-5)     at ...asynchronous invocation...(Unknown Source)
11:21:01,465 ERROR [stderr] (RequestProcessor-5)     at org.jboss.ejb.client.remoting.InvocationExceptionResponseHandler$MethodInvocationExceptionResultProducer.getResult(InvocationExceptionResponseHandler.java:99)
11:21:01,465 ERROR [stderr] (RequestProcessor-5)     at org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver.sendCommit(RemotingConnectionEJBReceiver.java:327)
11:21:01,465 ERROR [stderr] (RequestProcessor-5)     at org.jboss.ejb.client.EJBClientManagedTransactionContext$ResourceImpl.commit(EJBClientManagedTransactionContext.java:239)
11:21:01,465 ERROR [stderr] (RequestProcessor-5)     at com.arjuna.ats.internal.jta.resources.jts.orbspecific.XAResourceRecord.commit(XAResourceRecord.java:455)
11:21:01,465 ERROR [stderr] (RequestProcessor-5)     at com.arjuna.ArjunaOTS.OTSAbstractRecordPOA._invoke(OTSAbstractRecordPOA.java:201)
11:21:01,466 ERROR [stderr] (RequestProcessor-5)     at org.jacorb.poa.RequestProcessor.invokeOperation(RequestProcessor.java:306)
11:21:01,466 ERROR [stderr] (RequestProcessor-5)     at org.jacorb.poa.RequestProcessor.process(RequestProcessor.java:626)
11:21:01,466 ERROR [stderr] (RequestProcessor-5)     at org.jacorb.poa.RequestProcessor.run(RequestProcessor.java:769)
11:21:01,467 WARN  [com.arjuna.ats.jtax] (RequestProcessor-5) ARJUNA024023: XAResourceRecord.commit caused an XA error: XAException.XAER_PROTO from resource ResourceImpl{transactionKey=0:ffffc0a80164:316a9a9d:5196046f:1a, ejbClientContext=org.jboss.ejb.client.EJBClientContext@216695c0, nodeName='master:app-oneB', state=null} in transaction < 131072, 30, 36, 0000000000-1-1-64-88110049106-102-9981-1064111000264849, 303030303030303030302929-34-583113079136-72-69111-7634141303030567879303030303030 >: javax.transaction.xa.XAException
    at com.arjuna.ats.internal.jta.transaction.jts.jca.XATerminatorImple.recover(XATerminatorImple.java:238) [jbossjts-jacorb-4.17.4.Final-redhat-2.jar:4.17.4.Final-redhat-2]


Version-Release number of selected component (if applicable):
EAP 6.1

How reproducible:
run the quickstart JTS example

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 Tom Ross 2013-07-04 04:07:25 EDT
Could this be included in the 6.1.1 release ?
Comment 3 Ivo Studensky 2013-07-04 05:33:34 EDT
Created a PR for this:

https://github.com/jbossas/jboss-eap/pull/217
Comment 4 Jaikiran Pai 2013-07-05 01:28:51 EDT
Tom or someone from the support team, I would like someone from the team to test this fix before asking the customer to try it, please. I did not have the necessary setup or application to give that fix a try. If you had this reproducable locally for you, then please test out the fix and see if it really fixes it (it should).
Comment 5 Tom Ross 2013-07-05 02:36:54 EDT
No problem I can test it since I still have the test case. Let me know where i can find the build.
Comment 6 Jaikiran Pai 2013-07-05 04:23:21 EDT
Hi Tom, the fix has been merged to WildFly upstream and is available from here https://community.jboss.org/thread/224262.
Comment 7 Tom Ross 2013-07-05 05:06:52 EDT
Thank you for this pointer. I have managed to build WildFly Alpha 3. Do you think that would be enough if I run my test case with that build?
Comment 8 Jaikiran Pai 2013-07-05 05:15:52 EDT
Yes, that much should be fine.
Comment 9 Tom Ross 2013-07-08 10:03:37 EDT
Running the test case results in this messages on the client side:
[INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ jboss-as-ejb-multi-server-client ---
[WARNING]
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
	at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:appmain, moduleName:ejb, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@55c915a5
	at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:588)
	at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:116)
	at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:183)
	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)
	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)
	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)
	at com.sun.proxy.$Proxy14.invokeAll(Unknown Source)
	at org.jboss.as.quickstarts.ejb.multi.server.Client.main(Client.java:79)
	... 6 more

Also I see errors in server log file (see attached file)
Comment 10 Tom Ross 2013-07-08 10:04:39 EDT
Created attachment 770512 [details]
server errors after the client run
Comment 11 Tom Ross 2013-07-19 15:41:52 EDT
I test this fix with Wildfly Alpha 2 ( this is the only build that currently startup without errors) and it seems to work. I don't see any exceptions any more only few warnings but I don't believe they have anything to do with the original issue. I will ask the JBossTM guys to look at them.
Comment 12 Ondrej Chaloupka 2013-08-12 04:28:20 EDT
We (EAP QA) are not able to reproduce the issue.
I've run the quickstart with transactions set to jts against several EAP Versions (6.0.1, 6.1.0, 6.1.1.ER3, 6.1.1.ER4) and I didn't hit the problem in any case.
I've consulted the my settings with Tom and neither after taking his settings of the configuration I was not able to hit the problem. Everything runs smoothly without the mentioned error.

We agreed with Tom that he will check this issue as soon as he will have time for it and in case that he will find it ok that he verified the issue.


I would like mention that:
 - there was a change in accesing rights to EJB bean. When EJB contains a security annotation then all methods are by default set to @DenyAll. To avoid this and be able to run the quickstart it's needed to set default-missing-method-permissions-deny-access to false in ejb3 subsystem
 - in case of out of memory errors it helped me to delete content of the domain/servers directory (rm -rf domain/servers/*)
 - problem on wildfly alpha3 (Caused by: java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:appmain, moduleName:ejb, distinctName:] combination) seems to be caused by the fact that remoting ports were changed. But I'm not sure how to change the quickstart to be working. I suppose that the default port was changed from 4777 to 8080 but I'm not fully sure.
Comment 13 Jan Martiska 2013-08-12 04:55:57 EDT
The fix was tested on a WildFly build, as mentioned. QA was unable to reproduce with EAP, but verified the presence of the fix through JAR decompilation. We are nearing the end of test cycle and didn't receive enough feedback, so setting to VERIFIED as of EAP 6.1.1.ER4.
Comment 14 JBoss JIRA Server 2013-08-12 05:40:21 EDT
Tom Ross <toross@redhat.com> made a comment on jira WFLY-1362

I'm getting this exception when trying to run the test case. I don't believe this has anything to do with the original issue.

Caused by: javax.ejb.EJBException: java.lang.Exception: java.lang.NoClassDefFoundError: Could not initialize class com.arjuna.ats.internal.jts.OTSImpleManager
[Server:app-main] 	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:236) [jboss-ejb-client-1.0.23.Final-redhat-1.jar:1.0.23.Final-redhat-1]
[Server:app-main] 	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:181) [jboss-ejb-client-1.0.23.Final-redhat-1.jar:1.0.23.Final-redhat-1]
[Server:app-main] 	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:144) [jboss-ejb-client-1.0.23.Final-redhat-1.jar:1.0.23.Final-redhat-1]
[Server:app-main] 	at com.sun.proxy.$Proxy33.invoke(Unknown Source)
[Server:app-main] 	at org.jboss.as.quickstarts.ejb.multi.server.app.MainAppBean.invokeAppOne(MainAppBean.java:129) [ejb.jar:]
[Server:app-main] 	... 54 more
Comment 15 JBoss JIRA Server 2013-08-12 05:40:54 EDT
Tom Ross <toross@redhat.com> made a comment on jira WFLY-1362

I'm getting this exception when trying to run the test case. I don't believe this has anything to do with the original issue.
{noformat}
Caused by: javax.ejb.EJBException: java.lang.Exception: java.lang.NoClassDefFoundError: Could not initialize class com.arjuna.ats.internal.jts.OTSImpleManager
[Server:app-main] 	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:236) [jboss-ejb-client-1.0.23.Final-redhat-1.jar:1.0.23.Final-redhat-1]
[Server:app-main] 	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:181) [jboss-ejb-client-1.0.23.Final-redhat-1.jar:1.0.23.Final-redhat-1]
[Server:app-main] 	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:144) [jboss-ejb-client-1.0.23.Final-redhat-1.jar:1.0.23.Final-redhat-1]
[Server:app-main] 	at com.sun.proxy.$Proxy33.invoke(Unknown Source)
[Server:app-main] 	at org.jboss.as.quickstarts.ejb.multi.server.app.MainAppBean.invokeAppOne(MainAppBean.java:129) [ejb.jar:]
[Server:app-main] 	... 54 more
{noformat}

Note You need to log in before you can comment on or make changes to this bug.