-
1. Re: UserBusinessActivity Initialization in XTS Module?
paul.robinson Oct 23, 2012 1:06 PM (in response to fsalcher)1 of 1 people found this helpfulFabian,
UserBusinessActivityFactory.userBusinessActivity() returning null suggests that the XTS subsystem is not started. This happens if you try to call it outside of a container, or within a container that isn't started with the XTS subsystem enabled.
Is your client running standalone or inside AS7? XTS can't be ran (easily) standalone and you should make sure your client runs inside JBossAS (started with the standalone-xts.xml) that you mention in your post.
You may find this example simpler http://www.jboss.org/jdf/quickstarts/jboss-as-quickstart/wsba-coordinator-completion-simple/. Here you will see that the transaction is started in an Arquillian test which actually runs inside the AS7 server: https://github.com/jboss-jdf/jboss-as-quickstart/blob/7.1.2.M1/wsba-coordinator-completion-simple/src/test/java/org/jboss/as/quickstarts/wsba/coordinatorcompletion/simple/ClientTest.java
Paul.
-
2. Re: UserBusinessActivity Initialization in XTS Module?
fsalcher Oct 25, 2012 5:17 AM (in response to paul.robinson)Thanks for your reply, Paul!
My client is a simple HttpServlet which is deployed to JBoss. I guess the XTS subsystem is running because all the WS endpoints like http://localhost:8080/needserver-webapp/BusinessAgreementWithParticipantCompletionCoordinatorService are up...
Best,
Fabian
-
3. Re: UserBusinessActivity Initialization in XTS Module?
paul.robinson Oct 25, 2012 7:46 AM (in response to fsalcher)Fabian,
Can you provide me with the output to:
standalone.bat -c standalone-xts.xml
I notice you are using the 4.17.0 dependency for JBossTS. I would recommend you use the same version that ships with JBossAS that you are targeting.
To find this out, you can look at the version in the org.jboss.xts module
ls /opt/jboss-as-7.1.1.Final/modules/org/jboss/xts/main/ jbosstxbridge-4.16.2.Final.jar jbossxts-4.16.2.Final.jar jbossxts-api-4.16.2.Final.jar module.xml jbosstxbridge-4.16.2.Final.jar.index jbossxts-4.16.2.Final.jar.index jbossxts-api-4.16.2.Final.jar.index
In this case 4.16.2.Final
I don't think this is causing your problem, but it may prevent issues in the future.
Paul.
-
4. Re: UserBusinessActivity Initialization in XTS Module?
fsalcher Oct 25, 2012 9:51 AM (in response to paul.robinson)Here's the output: http://pastebin.com/znZbZ88K It's still with the 4.17.0 dependency, I will try it with the 4.16.2 next.
The interesting thing is that I can run the demo examples on the same JBoss. I also tried to run the simple client and WS example you mentioned before from inside my web app but there I have the same problem.
Best,
Fabian
-
5. Re: UserBusinessActivity Initialization in XTS Module?
paul.robinson Oct 25, 2012 10:12 AM (in response to fsalcher)Fabian,
I've just had a quick look and there is one odd thing that may be causing the problem. You seem to be deploying all the XTS services inside your application (needserver-webapp). Search for the following in the log:
http://localhost:8080/ws-t11-coordinator/TerminationCoordinatorService
http://localhost:8080/needserver-webapp/TerminationCoordinatorService
The first is the service that the XTS subsytem starts, the second is deployed by your application.
Can you send me the following output:
jar -tf needserver-webapp.war
I'm interested in seeing what you have bundled up in here.
Paul.
-
6. Re: UserBusinessActivity Initialization in XTS Module?
fsalcher Oct 25, 2012 10:25 AM (in response to paul.robinson)Here's the index of the needserver-webapp.war: http://pastebin.com/VFBYsmQY
-
7. Re: UserBusinessActivity Initialization in XTS Module?
paul.robinson Oct 26, 2012 5:37 AM (in response to fsalcher)Fabian,
Ok, I've spotted your problem. You are deploying the XTS jars (and many others) with the war file. This means that you are calling
UserBusinessActivityFactory.userBusinessActivity() from the Classloader associated with the war. This is different to the one that the XTS SubSystem is loaded within and where the UBA is initialized.
To solve the problem you need to remove all the jbossts libraries from your war and add dependencies to the MANIFEST.MF file. Take a look at this example:
I appreciate that this is an Arquillian example, but it makes it clear what is being deployed in the war. Take a look at the ShrinkWrap.create(...) and value of the ManifestMF field.
You should probably also remove all the other libs from your war that are provided in AS7 and replace them with dependencies in the MANIFEST.MF.
Paul.
-
8. Re: UserBusinessActivity Initialization in XTS Module?
fsalcher Oct 29, 2012 7:24 AM (in response to paul.robinson)Problem solved - thanks a lot, Paul!