4 Replies Latest reply on Mar 14, 2008 10:08 AM by Andrew Dinn

    remote UserTransaction -> SOAPClient == null

    Christian Kloy Newbie

      Hello,

      im also facing this "com.arjuna.wst.SystemException: java.lang.NullPointerException"-problem. I debug my application and found out, that there is no SOAPClient in the SOAPRegistry. When the transaction tries to get such a client, this NullPointerException is thrown.

      How could i register the nessacary "http"-client ?

      Regards,
      Christian

        • 1. Re: remote UserTransaction -> SOAPClient == null
          Andrew Dinn Master

          Which problem are you facing? Since you have not referred to another posting or added this to an existing topic your comments make no sense. Please make the context clear.

          • 2. Re: remote UserTransaction -> SOAPClient == null
            Christian Kloy Newbie

            Ok, sorry. When my application start a new Transaction, this Exception was thrown, because there weren't any SOAPClients in the regsitry. Now I solve this problem, it made a mistake in my configuration-file. But now, I got this error:

            10:05:45,772 ERROR [STDERR] com.arjuna.wst.SystemException: Receiver[java.io.IOException: javax.xml.stream.XMLStreamException: [com.arjuna.webservices.wsaddr.AddressingContext_1] - Addressing context is not valid]
            10:05:45,772 ERROR [STDERR] at com.arjuna.mwlabs.wst.at.remote.UserTransactionImple.startTransaction(UserTransactionImple.java:232)
            10:05:45,772 ERROR [STDERR] at com.arjuna.mwlabs.wst.at.remote.UserTransactionImple.begin(UserTransactionImple.java:105)
            10:05:45,772 ERROR [STDERR] at com.arjuna.mwlabs.wst.at.remote.UserTransactionImple.begin(UserTransactionImple.java:95)
            10:05:45,772 ERROR [STDERR] at de.vhv.wstransaction.poc.insuranceProposalManagement.transaction.impl.InsuranceProposalManagementTransactionAT.performTransaction(InsuranceProposalManagementTransactionAT.java:67)
            10:05:45,772 ERROR [STDERR] at de.vhv.wstransaction.poc.insuranceProposalManagement.service.impl.InsuranceProposalService.takeInsuranceProposal(InsuranceProposalService.java:12)
            10:05:45,772 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            10:05:45,772 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            10:05:45,772 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            10:05:45,772 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
            10:05:45,803 ERROR [STDERR] at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:194)
            10:05:45,803 ERROR [STDERR] at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:98)
            10:05:45,803 ERROR [STDERR] at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
            10:05:45,803 ERROR [STDERR] at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:96)
            10:05:45,803 ERROR [STDERR] at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
            10:05:45,803 ERROR [STDERR] at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
            10:05:45,803 ERROR [STDERR] at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120)
            10:05:45,803 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
            10:05:45,803 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            


            I think, this exception is thrown, when the UserTransactionImple tries to invoke the activateCoordinatorService.

            I start the transaction with this lines of code:
            UserTransaction transaction = UserTransactionFactory.userTransaction();
             try {
             transaction.begin();
            


            My wstx.xml:
            <wstx-config>
             <properties>
             <property name="com.arjuna.mw.wsas.deploymentContext"
             value="com.arjuna.mwlabs.wst.at.context.DeploymentContextImple"/>
             <property name="com.arjuna.mw.wscf.protocols.twophase.context"
             value="com.arjuna.mwlabs.wst.at.context.ArjunaContextImple"/>
             <property name="com.arjuna.mw.wscf.protocols.sagas.context"
             value="com.arjuna.mwlabs.wst.ba.context.ArjunaContextImple"/>
             <property
             name="com.arjuna.mw.wscf.protocolImplementation1"
             value="com.arjuna.mwlabs.wscf.model.twophase.arjunacore.TwoPhaseHLSImple"/>
             <property
             name="com.arjuna.mw.wscf.protocolImplementation2"
             value="com.arjuna.mwlabs.wst.at.ContextFactoryImple"/>
             <property
             name="com.arjuna.mw.wscf.protocolImplementation3"
             value="com.arjuna.mwlabs.wscf.model.sagas.arjunacore.SagasHLSImple"/>
             <property
             name="com.arjuna.mw.wscf.protocolImplementation4"
             value="com.arjuna.mwlabs.wst.ba.ContextFactoryImple"/>
             <property
             name="com.arjuna.ats.arjuna.objectstore.objectStoreDir"
             value="XTSObjectStore"/>
             <property
             name="com.arjuna.ats.arjuna.recovery.recoveryExtension1"
             value="com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule"/>
             <property name="com.arjuna.mw.wst.coordinatorURL"
             value="http://localhost:8080/xts/soap/ActivationCoordinator" />
             <property name="com.arjuna.mw.wst.ba.terminatorURL"
             value="http://localhost:8080/xts/soap/BusinessActivityTerminatorParticipant" />
             </properties>
            </wstx-config>
            


            The build and deploy of the webapps should be ok. I used the build.xml file. Ant didn't show any failures.


            Could that be a configuration-issue, or?

            • 3. Re: remote UserTransaction -> SOAPClient == null
              Andrew Dinn Master

               


              Could that be a configuration-issue, or?


              It certainly could. The error happens when startTransaction tries to send a request to the coordinator to create a coordination context for the transaction. It probably indicates that the Coordinator URL you have configured is invalid. Check your config file setting.

              • 4. Re: remote UserTransaction -> SOAPClient == null
                Andrew Dinn Master

                Oops, apologies for not noticing your config file in the last post. The coordinator URL looks to be formatted correctly. I'm not sure why you are supplying the default value though. You only specify this property if you are using a remote coordinator. Are you trying to do this? If so then the JBoss in which you are deploying XTS with this config file ought to have a different hostname/port.

                The exception appears to happen at the server end when it is handling a call by your client to method ActivationCoordinator.createCoordinationContext. The error mesage indicates that one of the WS addressing property values (From, To, ReplyTo etc) used in the reply was found to be invalid when the server is trying to send a reply to the client -- that's not invalid as in 'no host at this address' but invalid as in a badly formatted URL.

                The most obvious candidate is the return address (this is sent to the coordinator by the client using the value of the ActivationRequester URL). This URL computed by appending ActivationRequester to the HTTPMultiplexorServelet base URL defined by a servlet property in the web.xml of jar ws-c.war. How have you deployed this .war file? What is the value of the BaseHttpURL property? It is peobably invalid because you have copied the template file (contains @@ sequences) rather than a copy substituted with the required values..

                Study the demo build.xml file to see how this web.xml file gets installed into the demo ear file using whatever the hostname and port supplied in jboss.properties Your app build process should be doing something similar.