4 Replies Latest reply on Feb 20, 2009 12:10 AM by Karthik M

    Beginer - Need help on demo Application

    Karthik M Newbie

      Hi All,

      I have the following requirements.

      I shall have a web service (gateway) which calls 3 more web services a,b,c.

      All the webservices may be deployed on the same JBoss instance or different instances.

      We want to implement Distributed transactions such that all operations in services a,b,c happens atomically. This is co-ordinated by the gateway webservice.

      I have been going thru many artciles and have been lead too the excellent support for Webservices transaction from Jboss Transactions.

      I shall be running jboss-5.0.0.GA Server on Jdk 1.5

      Now my questions :

      1) can all the above requirements be met by Jboss transactions ?
      2) I downloaded the sampe code for the above from
      http://anonsvn.labs.jboss.com/labs/jbosstm/trunk/XTS/demo/ ONLY....this project is downloaded.

      I am finding that many classes are not found such as :

      UserTransactionFactory,TransactionManagerFactory,Durable2PCParticipant all refer to some com.arjuna.wst.* packages. I must confess i am not sure which jar dependencies need to be satisfied for me to run the demo successfuly. can u please outline i am stuck..

      3) The jboss-5.0.0.GA version already has Jboss transactions configured. I am not required to configure anything else. right ? just drop the ear and hope it works.

      4) I am assuming that once everything works all i need is to have the gateway deployed on a jboss server and all other services a,b,c, may be deployed on web servers (with Jboss transaction jars) and that should be fine.

      5) can you please mention a small sequence which can get me sailing....I am finding it difficult to comprehend where to start.

      All i know now is look at the demo and manipulate to create 3 services being called from a servlet for now. resolve the jboss classes by adding appropriate jars and once things get compiled ...deploy the ear on Jboss....i know it cant be that simple :)

      Please help !!!


        • 1. Re: Beginer - Need help on demo Application
          Andrew Dinn Master

          The Web Services Transaction component is not deployed in the jboss-5.0.0.GA release (it will be in later releases). So, you need to download the XTS release from


          then build it by running

          ant clean install

          in the XTS directory.

          n.b. If you just download the XTS tree then you will need to modify the build script (build.xml) slightly because it expects to find the JBossTS jars (jbossjta.jar jbossts-common.jar commons-logging-1.1.jar) in ../lib and ../lib/ext. Edit the paths used to locate these jars to point to the relevant place in your installed JBoss AS tree and it should build successfully.

          Once the XTS build has completed you will find that you now have an XTS release tree in


          This includes a service archive


          Drop this sar file into the server deploy directory to make the XTS service(s) available in your AS.

          Having built the XTS release you can now install the demo into your XTS release and then build it. In directory XTS/demo run command

          ant build

          This will create a directory XTS/xts-install/demo which you can build against the your XTS release. If you run

          bash build.sh jboss clean build

          or, on Windows,

          build.bat jboss clean build

          this will create the demo ear file in


          Drop this into your server deploy directory and start your AS. The demo will be available at URL:


          • 2. Re: Beginer - Need help on demo Application
            Karthik M Newbie

            Thanks for the excellent info.

            I was trying to download from :


            using 1) Collabnet svn from Netbeans
            2) Tortoise SVN windows integrated

            In both cases i got could not connect to server.

            How do i download. I can open the URL in browser and download individual files... but tools are not allowing me to check out... Any special permission required.

            Am i doing somethin wrong.. how can i download the entire code under XTS recursively ?

            • 3. Re: Beginer - Need help on demo Application
              Andrew Dinn Master

              We do try to be as helpful as our limited time allows on this forum when it comes to providing advice about the JBossTS project. That said, if you want advice on how to access an svn repository I think you probably need to find an svn help forum. The URL you are using is valid and I just managed to download the XTS tree. Maybe you should try again or check your svn client.

              • 4. Re: Beginer - Need help on demo Application
                Karthik M Newbie

                Hi All,

                I resolved the checkout problem. It was a proxy issue with SVN. It cannot detect system proxy settings (at least the one i had coudn't). Need to specify manual proxy.

                Now i tried compiling the code with exact steps mentioned in the above post and i got this error (i fixed it via a hack):

                [echo] Compiling module generic code
                [javac] Compiling 143 source files to D:\FINALLY\XTS\WSCF\build\classes
                [javac] D:\FINALLY\XTS\WSCF\classes\com\arjuna\mwlabs\wscf\model\sagas\arjunacore\ParticipantRecord.java:108: cannot find symbol
                [javac] symbol : variable XTS_WSBA_RECORD
                [javac] location: class com.arjuna.ats.arjuna.coordinator.RecordType
                [javac] return RecordType.XTS_WSBA_RECORD;
                [javac] ^
                [javac] D:\FINALLY\XTS\WSCF\classes\com\arjuna\mwlabs\wscf\model\twophase\arjunacore\ParticipantRecord.java:107: cannot find symbol
                [javac] symbol : variable XTS_WSAT_RECORD
                [javac] location: class com.arjuna.ats.arjuna.coordinator.RecordType
                [javac] return RecordType.XTS_WSAT_RECORD;
                [javac] ^
                [javac] Note: Some input files use unchecked or unsafe operations.
                [javac] Note: Recompile with -Xlint:unchecked for details.
                [javac] 2 errors

                I solved this problem by replacing cosntants looking at the file RecordType.

                Now all is done and deployed...i got the demo servlet running...

                When i used Atomic option and clicked submit ...i always got an exception "could not trasmit the message"

                Exception stack attached..Please help...i appreciate all help that the people are providing for my questions (some times very stupid questions :) )...

                2009-02-20 10:32:57,671 INFO [STDOUT] (http- CLIENT: transaction ID= AtomicTransactionIdentifier: urn:ac94893:ef2:499e3826:7e
                2009-02-20 10:32:57,671 INFO [STDOUT] (http- CLIENT: calling business Web Services...
                2009-02-20 10:32:57,671 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] (http- pushMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@181b9f7 (Thread http-
                2009-02-20 10:32:57,671 DEBUG [org.jboss.ws.core.EndpointInvocation] (http- setRequestParamValue: [name=how_many,value=java.lang.Integer]
                2009-02-20 10:32:57,671 DEBUG [org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS] (http- bindRequestMessage: {http://www.jboss.com/jbosstm/xts/demo/Restaurant}bookSeats
                2009-02-20 10:32:57,671 DEBUG [org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS] (http- Create RPC body element: {http://www.jboss.com/jbosstm/xts/demo/Restaurant}bookSeats
                2009-02-20 10:32:57,671 DEBUG [org.jboss.ws.core.EndpointInvocation] (http- getRequestParamValue: how_many
                2009-02-20 10:32:57,671 DEBUG [org.jboss.ws.core.EndpointInvocation] (http- transformPayloadValue: java.lang.Integer -> java.lang.Integer
                2009-02-20 10:32:57,671 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] (http- Create a handler executor: []
                2009-02-20 10:32:57,671 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] (http- Create a handler executor: [com.arjuna.mw.wst11.client.JaxWSHeaderContextProcessor@1c5e45b]
                2009-02-20 10:32:57,671 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] (http- Enter: handleOutBoundMessage
                2009-02-20 10:32:57,671 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] (http- popMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@1abc0bd (Thread http-
                2009-02-20 10:32:57,718 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] (http- Exit: handleOutBoundMessage with status: true
                2009-02-20 10:32:57,718 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] (http- Create a handler executor: []
                2009-02-20 10:32:57,718 DEBUG [org.jboss.ws.core.client.HTTPRemotingConnection] (http- Get locator for: [addr=http://JBOSS_HOSTNAME:JBOSS_PORT/JBOSS_URLSTUB/RestaurantServiceAT,props={javax.xml.ws.service.endpoint.address=http://JBOSS_HOSTNAME:JBOSS_PORT/JBOSS_URLSTUB/RestaurantServiceAT}]
                2009-02-20 10:32:57,718 DEBUG [org.jboss.remoting.MicroRemoteClientInvoker] (http- org.jboss.remoting.transport.http.HTTPClientInvoker@c622e0 connecting
                2009-02-20 10:32:57,718 DEBUG [org.jboss.remoting.MicroRemoteClientInvoker] (http- org.jboss.remoting.transport.http.HTTPClientInvoker@c622e0 connected
                2009-02-20 10:32:57,718 DEBUG [org.jboss.ws.core.client.HTTPRemotingConnection] (http- Remoting metadata: {HEADER={SOAPAction="", Content-Type=text/xml; charset=UTF-8}, NoThrowOnError=true}
                2009-02-20 10:32:57,718 DEBUG [org.jboss.remoting.transport.http.HTTPClientInvoker] (http- Setting request header with SOAPAction : ""
                2009-02-20 10:32:57,718 DEBUG [org.jboss.remoting.transport.http.HTTPClientInvoker] (http- Setting request header with Content-Type : text/xml; charset=UTF-8
                2009-02-20 10:32:57,718 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] (http- -----------------------------------
                2009-02-20 10:32:57,718 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] (http- Transitioning from OBJECT_VALID to XML_VALID
                2009-02-20 10:32:57,718 DEBUG [org.jboss.ws.core.soap.ObjectContent] (http- getXMLFragment from Object [xmlType={http://www.w3.org/2001/XMLSchema}int,javaType=int]
                2009-02-20 10:32:57,718 DEBUG [org.jboss.ws.core.jaxrpc.binding.SimpleSerializer] (http- serialize: [xmlName=how_many,xmlType={http://www.w3.org/2001/XMLSchema}int]
                2009-02-20 10:32:57,718 DEBUG [org.jboss.ws.core.soap.ObjectContent] (http- xmlFragment: [source=<how_many>1</how_many>]
                2009-02-20 10:32:57,718 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] (http- -----------------------------------
                2009-02-20 10:32:57,734 DEBUG [org.jboss.remoting.transport.http.HTTPClientInvoker] (http- Cannot connect on attempt 1
                2009-02-20 10:32:57,734 DEBUG [org.jboss.ws.core.jaxws.handler.MessageContextJAXWS] (http- Begin response processing
                2009-02-20 10:32:57,734 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] (http- popMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@181b9f7 (Thread http-
                2009-02-20 10:32:57,734 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] (http- pushMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@fccd15 (Thread http-
                2009-02-20 10:32:57,734 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] (http- Enter: handleIn BoundFault
                2009-02-20 10:32:57,734 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] (http- SOAP request exception
                java.io.IOException: Could not transmit message
                at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:264)
                at org.jboss.ws.core.client.SOAPProtocolConnectionHTTP.invoke(SOAPProtocolConnectionHTTP.java:71)
                at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:340)
                at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:291)
                at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:170)
                at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
                at $Proxy165.bookSeats(Unknown Source)

                Some traces in server start up :

                1) javax.management.InstanceNotFoundException: jboss:service=CorbaORB is not registered.
                at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:529)

                2) 2009-02-20 10:27:20,890 DEBUG [org.jboss.messaging.core.impl.JDBCSupport] (main) Failed to execute: CREATE TABLE JBM_USER (USER_ID VARCHAR(32) NOT NULL, PASSWD VARCHAR(32) NOT NULL, CLIENTID VARCHAR(128), PRIMARY KEY(USER_ID))
                java.sql.SQLException: Table already exists: JBM_USER in statement [CREATE TABLE JBM_USER]
                at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
                at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)