Bug 981174 - javax.transaction.xa.XAException thrown when using JTS transactions
Summary: javax.transaction.xa.XAException thrown when using JTS transactions
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: EJB
Version: 6.1.0
Hardware: All
OS: All
high
high
Target Milestone: ER4
: EAP 6.1.1
Assignee: Ivo Studensky
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-04 08:05 UTC by Tom Ross
Modified: 2018-12-02 17:38 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-16 20:28:32 UTC
Type: Bug
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker WFLY-1362 0 Major Closed javax.transaction.xa.XAException thrown when using JTS transactions 2018-02-07 07:50:39 UTC

Description Tom Ross 2013-07-04 08:05:21 UTC
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 08:07:25 UTC
Could this be included in the 6.1.1 release ?

Comment 3 Ivo Studensky 2013-07-04 09:33:34 UTC
Created a PR for this:

https://github.com/jbossas/jboss-eap/pull/217

Comment 4 Jaikiran Pai 2013-07-05 05:28:51 UTC
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 06:36:54 UTC
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 08:23:21 UTC
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 09:06:52 UTC
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 09:15:52 UTC
Yes, that much should be fine.

Comment 9 Tom Ross 2013-07-08 14:03:37 UTC
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 14:04:39 UTC
Created attachment 770512 [details]
server errors after the client run

Comment 11 Tom Ross 2013-07-19 19:41:52 UTC
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 08:28:20 UTC
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 08:55:57 UTC
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 09:40:21 UTC
Tom Ross <toross> 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 09:40:54 UTC
Tom Ross <toross> 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.