3 Replies Latest reply on Oct 6, 2010 4:22 AM by Andrew Dinn

    How to run XTS demo on separated nodes

    Masao Kunii Newbie

      Hi,

       

      I use JBoss EAP 5.0.1 and  would like to deploy an  XTS client application and Web service applications on defferent nodes. (like node1:client, node2:WS).
      To learn how to do it, I modified XTS demo and deployed it but It does not work.
      Maybe I did wrong steps or need extra steps.

       

      Here are steps I have done:
      1) Modified hostname parts of some WSDL files in jbossts-4.6.1.GA.CP04/XTS/demo/dd/jboss/wsdl and jboss.properties in demo.
      2) Modified hostname parts of some WSDL files in jbossts-4.6.1.GA.CP04/XTS/WS-T/build/dev/dd/wsdl.
      3) Built jbossxts.sar and xts-demo.ear and deployed them on each node.
      Actually, demo.ear and jbossxts.sar are not separated client and WS but I guess no problem.
      4) Accessed to the client application at node1 and created a BA transaction.

       

      However, I got a javax.xml.ws.soap.SOAPFaultException at node2.

       

       

      2010-09-27 16:43:27,483 INFO  [STDOUT] (http-0.0.0.0-8080-1) RestaurantServiceBA transaction id =BusinessActivityIdentifier: urn:-53e18f72:778:4ca04acf:6a
      2010-09-27 16:43:27,911 WARN  [org.jboss.util.xml.JBossEntityResolver] (http-0.0.0.0-8080-1) Trying to resolve systemId as a non-file URL: vfszip:/opt/jboss-eap-5.0.1/jboss-as/server/test/deploy/jbossxts.sar/ws-c11.jar/org/oasis_open/docs/ws_tx/wscoor/_2006/_06/wsdl/wscoor.wsdl
      2010-09-27 16:43:27,913 WARN  [org.jboss.util.xml.JBossEntityResolver] (http-0.0.0.0-8080-1) Trying to resolve systemId as a non-file URL: vfszip:/opt/jboss-eap-5.0.1/jboss-as/server/test/deploy/jbossxts.sar/ws-c11.jar/org/oasis_open/docs/ws_tx/wscoor/_2006/_06/wsdl/wscoor.xsd
      2010-09-27 16:43:28,042 WARN  [org.jboss.util.xml.JBossEntityResolver] (http-0.0.0.0-8080-1) Trying to resolve systemId as a non-file URL: vfszip:/opt/jboss-eap-5.0.1/jboss-as/server/test/deploy/jbossxts.sar/ws-c11.jar/org/oasis_open/docs/ws_tx/wscoor/_2006/_06/wsdl/wscoor.xsd
      2010-09-27 16:43:28,063 WARN  [org.jboss.ws.tools.wsdl.WSDL11Reader] (http-0.0.0.0-8080-1) UsingAddressing extensibility element not supported yet.
      2010-09-27 16:43:28,396 ERROR [STDERR] (http-0.0.0.0-8080-2) javax.xml.ws.soap.SOAPFaultException: Sender
      2010-09-27 16:43:28,404 ERROR [STDERR] (http-0.0.0.0-8080-2)     at com.arjuna.wsc11.messaging.RegistrationCoordinatorProcessorImpl.register(RegistrationCoordinatorProcessorImpl.java:132)
      2010-09-27 16:43:28,404 ERROR [STDERR] (http-0.0.0.0-8080-2)     at com.arjuna.webservices11.wscoor.sei.RegistrationPortTypeImpl.registerOperation(RegistrationPortTypeImpl.java:56)
      2010-09-27 16:43:28,404 ERROR [STDERR] (http-0.0.0.0-8080-2)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2010-09-27 16:43:28,404 ERROR [STDERR] (http-0.0.0.0-8080-2)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      2010-09-27 16:43:28,404 ERROR [STDERR] (http-0.0.0.0-8080-2)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      2010-09-27 16:43:28,404 ERROR [STDERR] (http-0.0.0.0-8080-2)     at java.lang.reflect.Method.invoke(Method.java:616)
      2010-09-27 16:43:28,404 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.jboss.wsf.container.jboss50.invocation.InvocationHandlerJSE.invoke(InvocationHandlerJSE.java:108)
      2010-09-27 16:43:28,404 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:221)
      2010-09-27 16:43:28,404 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:468)
      2010-09-27 16:43:28,404 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:293)
      2010-09-27 16:43:28,404 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:203)
      2010-09-27 16:43:28,405 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:129)
      2010-09-27 16:43:28,405 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85)
      2010-09-27 16:43:28,405 ERROR [STDERR] (http-0.0.0.0-8080-2)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      2010-09-27 16:43:28,405 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      2010-09-27 16:43:28,405 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2010-09-27 16:43:28,405 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      2010-09-27 16:43:28,405 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2010-09-27 16:43:28,405 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2010-09-27 16:43:28,405 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
      2010-09-27 16:43:28,405 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      2010-09-27 16:43:28,405 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
      2010-09-27 16:43:28,406 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
      2010-09-27 16:43:28,406 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
      2010-09-27 16:43:28,406 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
      2010-09-27 16:43:28,406 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      2010-09-27 16:43:28,406 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      2010-09-27 16:43:28,406 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
      2010-09-27 16:43:28,406 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      2010-09-27 16:43:28,406 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      2010-09-27 16:43:28,406 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
      2010-09-27 16:43:28,406 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
      2010-09-27 16:43:28,407 ERROR [STDERR] (http-0.0.0.0-8080-2)     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      2010-09-27 16:43:28,407 ERROR [STDERR] (http-0.0.0.0-8080-2)     at java.lang.Thread.run(Thread.java:636)
      2010-09-27 16:43:28,416 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] (http-0.0.0.0-8080-2) SOAP request exception
      javax.xml.ws.ProtocolException: javax.xml.ws.soap.SOAPFaultException: Sender
          at com.arjuna.wsc11.messaging.RegistrationCoordinatorProcessorImpl.register(RegistrationCoordinatorProcessorImpl.java:138)
          at com.arjuna.webservices11.wscoor.sei.RegistrationPortTypeImpl.registerOperation(RegistrationPortTypeImpl.java:56)
          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:616)
          at org.jboss.wsf.container.jboss50.invocation.InvocationHandlerJSE.invoke(InvocationHandlerJSE.java:108)
          at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:221)
          at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:468)
          at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:293)
          at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:203)
          at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:129)
          at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
          at java.lang.Thread.run(Thread.java:636)
      Caused by: javax.xml.ws.soap.SOAPFaultException: Sender
          at com.arjuna.wsc11.messaging.RegistrationCoordinatorProcessorImpl.register(RegistrationCoordinatorProcessorImpl.java:132)
          ... 33 more
      

       

      Could you tell me what I should do to make XTS demo separated?
      Which files should I modify? and how?

       

      Thanks,
      Masao

        • 1. Re: How to run XTS demo on separated nodes
          Andrew Dinn Master

          Hi Masao,

           

          I am puzzled by the stack trace in your message. The error is happening under a JaxWS request to the registration service . The problem is that a register request has been made with an invalid protocol.  If you look in the server logs you will see a message containing this tag

           

          "com.arjuna.wsc11.messaging.RegistrationCoordinatorProcessorImpl_2

           

          The message will include the String which was used as the invalid protocol name.

           

          This request gets made from a few different  places. There are two polaces where the client may make thisJaxWS request. When the demo client calls UserTransaction.begin() it registers for the Completion protocol. When it calls UserBusinessActivity.begin() it registers for the ArjunaTermination protocol. There are also several plpaces where the web services may register for this protocol. When the services enlist inside an AT transaction they register for the DurableParticipant protocol. When they enlist inst a BA transaction they enlist for the ParticipantCompletionParticipant protocol.

           

          I don't really understand how you have managed to get your version of the demo to make a JaxWS request using some other protocol. This  would require changing the source code.

           

          I don't think there is any point pursuing this problem because the list of changes you describe in your note includes lots of changes that are not needed. You only need to change a  small number of things in order to be abel to separate the clinet and the server. You don't have to change any WSDL. Not for the demo app and not for the XTS code. here is what you shoudl do.

           

          1) Checkout a fresh copy of JBossTS-4.6.1.GA.CP04

           

          $ cd $HOME/mysourceroot

          $ svn co http://anonsvn.jboss.org/repos/labs/labs/jbosstm/tags/JBOSSTS_4_6_1_GA_CP04/

          2) cd to  the root of this svn source tree and build JBossTS

          $ cd JBOSSTS_4_6_1_GA_CP04

          $ ant jta

          3) cd to the XTs directory and build XTS

          $ cd XTS

          $ ant install

          4) Copy the XTS service archive to the deploy directory for the demo application client and application web services JBoss instances

          On your client host (client.my.org)

          $ cp xts-install/sar/jbossxts.sar ${JBOSS_HOME}/server/default/deploy

           

          On your web service host (services.my.org)

          $ cp xts-install/sar/jbossxts.sar ${JBOSS_HOME}/server/default/deploy

          I am assuming that you will start the JBoss on the client host with the default server and using -b client.my.org but obviously you can use whatever server config and address you like. Similarly, I am  also assuming that you will start JBoss  on the web services host with the default  server config and address services.my.org.

          5) cd to the installed demo directory and edit the jboss.properties file so that the service URLs include rthe name fo the web services host

          $ cd xts-install/demo

          edit jboss.properties and replace

          JBOSS_HOSTNAME ==> services.my.org

          JBOSS_PORT ==> 8080

          JBOSS_URLSTUB ==> xtsdemowebservices

          6) Build the demo

          $ bash build.sh jboss build

          7) Deploy the client web app  on the client host and the services web app on the services host

          On the client host

          $cp xts-install/demo/build/xts-demo.war ${JBOSS_HOME}/server/default/deploy

          On the web services host

          $cp xts-install/demo/build/xts-demo-webservices.war ${JBOSS_HOME}/server/default/deploy

          8) Start each ofthe wo JBoss AS instances

          On the client host

          $ $JBOSS_HOME/run.sh -b client.my.org

          On the web services host

          $ $JBOSS_HOME/run.sh -b services.my.org

          9) Point your browser at the client on the client host (http://client.my.org:8080/xts-demo) and use the GUI to run the  demo. It will make calls to the the web services on services.my.org

          • 2. Re: How to run XTS demo on separated nodes
            Masao Kunii Newbie

            Thank you for quick reply.

            I did as you told me and succeeded to run them finally. Thank you very much!!
            Incidentally, at first I got 404 error when the client called the web service because the context path was "xts-demo-webservices". So I renamed xts-demo-webservices.war to xtsdemowebservices.war to be the context path "xtsdemowebservices".

            • 3. Re: How to run XTS demo on separated nodes
              Andrew Dinn Master

              masao kunii wrote:

               

              Thank you for quick reply.

              I did as you told me and succeeded to run them finally. Thank you very much!!

               

              You are welcome. I hope you manage to use XTS successfully in your application and I'll be happy to help you resolve any further problems.

               

              Incidentally, at first I got 404 error when the client called the web service because the context path was "xts-demo-webservices". So I renamed xts-demo-webservices.war to xtsdemowebservices.war to be the context path "xtsdemowebservices".

              Ah yes, I am sorry I did not notice that detail. The two war files are normally deployed to the same JBoss instance embedde inside xts-demo.ear (yyou can see this file in the xts-install directory). The application.xml in the ear file sets the context path for the services web archive to "xtsdemowebservices". If you deploy the war outside on its own then the path is set using the root name of the war file.

               

              Another way to fix this would be to deploy the war using its original name, xts-demo-webservices.war, but to substitute JBOSS_URLSTUB ==> xts-demo-webservices in file jboss.properties.