You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Mohan Radhakrishnan <ra...@gmail.com> on 2008/06/23 16:17:52 UTC

java.lang.NullPointerException AbstractDispatcher.invoke

Hi,
     Not sure what this exception means. I have also pasted the source code
at the end. Line 122 is
                    msgctx
					.setProperty(
							Constants.AXIS_BINDING_MESSAGE,
							axisBindingOperation
									.getChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE));

---------------------------------------------------------------

org.apache.axis2.description.AxisService - Found axis operation: 
org.apache.axis2.description.InOutAxisOperation@1ee5f07
org.apache.axis2.i18n.resource::handleGetObject(operationfound)
org.apache.axis2.engine.AbstractDispatcher - [MessageContext:
logID=urn:uuid:2238BDBE9F1622487F1214229558385] Found AxisOperation :
response
org.apache.axis2.transport.http.AxisServlet - 

java.lang.NullPointerException
	at
org.apache.axis2.engine.AbstractDispatcher.invoke(AbstractDispatcher.java:122)
	at org.apache.axis2.engine.Phase.invoke(Phase.java:317)
	at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)

Thanks,
Mohan

                msgctx.setAxisOperation(axisOperation);
                //setting axisMessage into messageContext
                msgctx.setAxisMessage(axisOperation.getMessage(
                        WSDLConstants.MESSAGE_LABEL_IN_VALUE));
                AxisEndpoint axisEndpoint =
                        (AxisEndpoint)
msgctx.getProperty(WSDL2Constants.ENDPOINT_LOCAL_NAME);
                if (axisEndpoint != null) {
                    AxisBindingOperation axisBindingOperation =
                            (AxisBindingOperation) axisEndpoint.getBinding()
                                    .getChild(axisOperation.getName());
                    msgctx
					.setProperty(
							Constants.AXIS_BINDING_MESSAGE,
							axisBindingOperation
									.getChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE));
                    msgctx.setProperty(Constants.AXIS_BINDING_OPERATION,
axisBindingOperation);

-- 
View this message in context: http://www.nabble.com/java.lang.NullPointerException-AbstractDispatcher.invoke-tp18070227p18070227.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: java.lang.NullPointerException AbstractDispatcher.invoke

Posted by Mohan Radhakrishnan <ra...@gmail.com>.
Hi,
      I tried the latest nightly build. Which build should I try ?

      I don't see any change.


Thanks,
Mohan
-- 
View this message in context: http://www.nabble.com/java.lang.NullPointerException-AbstractDispatcher.invoke-tp18070227p18110687.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: java.lang.NullPointerException AbstractDispatcher.invoke

Posted by Amila Suriarachchi <am...@gmail.com>.
could you please try with a nighly build. I fixed a similar issue.

thanks,
Amila.

On Mon, Jun 23, 2008 at 7:47 PM, Mohan Radhakrishnan <
radhakrishnan.mohan@gmail.com> wrote:

>
> Hi,
>     Not sure what this exception means. I have also pasted the source code
> at the end. Line 122 is
>                    msgctx
>                                        .setProperty(
>
>  Constants.AXIS_BINDING_MESSAGE,
>                                                        axisBindingOperation
>
>  .getChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE));
>
> ---------------------------------------------------------------
>
> org.apache.axis2.description.AxisService - Found axis operation:
> org.apache.axis2.description.InOutAxisOperation@1ee5f07
> org.apache.axis2.i18n.resource::handleGetObject(operationfound)
> org.apache.axis2.engine.AbstractDispatcher - [MessageContext:
> logID=urn:uuid:2238BDBE9F1622487F1214229558385] Found AxisOperation :
> response
> org.apache.axis2.transport.http.AxisServlet -
>
> java.lang.NullPointerException
>        at
>
> org.apache.axis2.engine.AbstractDispatcher.invoke(AbstractDispatcher.java:122)
>        at org.apache.axis2.engine.Phase.invoke(Phase.java:317)
>        at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
>
> Thanks,
> Mohan
>
>                msgctx.setAxisOperation(axisOperation);
>                //setting axisMessage into messageContext
>                msgctx.setAxisMessage(axisOperation.getMessage(
>                        WSDLConstants.MESSAGE_LABEL_IN_VALUE));
>                AxisEndpoint axisEndpoint =
>                        (AxisEndpoint)
> msgctx.getProperty(WSDL2Constants.ENDPOINT_LOCAL_NAME);
>                if (axisEndpoint != null) {
>                    AxisBindingOperation axisBindingOperation =
>                            (AxisBindingOperation) axisEndpoint.getBinding()
>                                    .getChild(axisOperation.getName());
>                    msgctx
>                                        .setProperty(
>
>  Constants.AXIS_BINDING_MESSAGE,
>                                                        axisBindingOperation
>
>  .getChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE));
>                    msgctx.setProperty(Constants.AXIS_BINDING_OPERATION,
> axisBindingOperation);
>
> --
> View this message in context:
> http://www.nabble.com/java.lang.NullPointerException-AbstractDispatcher.invoke-tp18070227p18070227.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Re: java.lang.NullPointerException AbstractDispatcher.invoke

Posted by Mohan Radhakrishnan <ra...@gmail.com>.
Hi,
     The service uses XMLBeans bindings and is large but I have pasted the
WSDL. The curious thing is that the same WAR works on Tomcat and is able to
hit the service.

1. Is axis2.xml the problem ?

2. services.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file was auto-generated from WSDL -->
<!-- by the Apache Axis2 version: 1.4  Built on : Apr 26, 2008 (06:24:30
EDT) -->
<serviceGroup>
    <service name="Response">
        <messageReceivers>
            <messageReceiver mep="http://www.w3.org/ns/wsdl/in-out"
class="com.MessageReceiverInOut"/>
        </messageReceivers>
        <parameter name="ServiceClass">com.ResponseSkeleton</parameter>
        <parameter name="useOriginalwsdl">true</parameter>
        <parameter name="modifyUserWSDLPortAddress">true</parameter>
        <operation name="invokeResponse"
mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://test.com">
            <actionMapping>\"\"</actionMapping>
           
<outputActionMapping>http://test.com/PortType/invokeResponse</outputActionMapping>
        </operation>
    </service>
</serviceGroup>


Thanks,
Mohan

<?xml version='1.0' encoding='UTF-8'?>
<s0:definitions name="ServiceDefinitions" targetNamespace="http://test.com"
xmlns="" xmlns:s0="http://schemas.xmlsoap.org/wsdl/"
xmlns:s1="http://test.com" xmlns:s2="http://schemas.xmlsoap.org/wsdl/soap/">
  <s0:types>
    <xs:schema attributeFormDefault="unqualified"
elementFormDefault="qualified" targetNamespace="http://test.com"
xmlns:s0="http://schemas.xmlsoap.org/wsdl/" xmlns:s1="http://test.com"
xmlns:s2="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:element name="invoke">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="arg0" type="xs:string"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="invokeResponse">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="return" type="xs:string"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
  </s0:types>
  <s0:message name="invoke">
    <s0:part element="s1:invoke" name="parameters"/>
  </s0:message>
  <s0:message name="invokeResponse">
    <s0:part element="s1:invokeResponse" name="parameters"/>
  </s0:message>
  <s0:portType name="PortType">
    <!--<s0:operation name="invoke" parameterOrder="parameters">
      <s0:input message="s1:invoke"/>
      <s0:output message="s1:invokeResponse"/>
    </s0:operation>-->
    <s0:operation name="invokeResponse" parameterOrder="parameters">
      <s0:input message="s1:invokeResponse"/>
      <s0:output message="s1:invokeResponse"/>
    </s0:operation>
  </s0:portType>
  <s0:binding name="ServiceSoapBinding" type="s1:PortType">
    <s2:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
    <!--<s0:operation name="invoke">
      <s2:operation soapAction="" style="document"/>
      <s0:input>
        <s2:body parts="parameters" use="literal"/>
      </s0:input>
      <s0:output>
        <s2:body parts="parameters" use="literal"/>
      </s0:output>
    </s0:operation>-->
    <s0:operation name="invokeResponse">
      <s2:operation soapAction="" style="document"/>
      <s0:input>
        <s2:body parts="parameters" use="literal"/>
      </s0:input>
      <s0:output>
        <s2:body parts="parameters" use="literal"/>
      </s0:output>
    </s0:operation>
  </s0:binding>
  <s0:service name="Response">
    <s0:port binding="s1:ServiceSoapBinding" name="TestPort">
      <s2:address location="http://11.127.32.32:222/Test"/>
    </s0:port>
  </s0:service>
</s0:definitions>
-- 
View this message in context: http://www.nabble.com/java.lang.NullPointerException-AbstractDispatcher.invoke-tp18070227p18085509.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: java.lang.NullPointerException AbstractDispatcher.invoke

Posted by keith chapman <ke...@gmail.com>.
Hi Mohan,

Can you provide us with more information as to how we can reproduce this
error. Sample service and request sent would be great.

Thanks,
Keith.

On Mon, Jun 23, 2008 at 7:47 PM, Mohan Radhakrishnan <
radhakrishnan.mohan@gmail.com> wrote:

>
> Hi,
>     Not sure what this exception means. I have also pasted the source code
> at the end. Line 122 is
>                    msgctx
>                                        .setProperty(
>
>  Constants.AXIS_BINDING_MESSAGE,
>                                                        axisBindingOperation
>
>  .getChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE));
>
> ---------------------------------------------------------------
>
> org.apache.axis2.description.AxisService - Found axis operation:
> org.apache.axis2.description.InOutAxisOperation@1ee5f07
> org.apache.axis2.i18n.resource::handleGetObject(operationfound)
> org.apache.axis2.engine.AbstractDispatcher - [MessageContext:
> logID=urn:uuid:2238BDBE9F1622487F1214229558385] Found AxisOperation :
> response
> org.apache.axis2.transport.http.AxisServlet -
>
> java.lang.NullPointerException
>        at
>
> org.apache.axis2.engine.AbstractDispatcher.invoke(AbstractDispatcher.java:122)
>        at org.apache.axis2.engine.Phase.invoke(Phase.java:317)
>        at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
>
> Thanks,
> Mohan
>
>                msgctx.setAxisOperation(axisOperation);
>                //setting axisMessage into messageContext
>                msgctx.setAxisMessage(axisOperation.getMessage(
>                        WSDLConstants.MESSAGE_LABEL_IN_VALUE));
>                AxisEndpoint axisEndpoint =
>                        (AxisEndpoint)
> msgctx.getProperty(WSDL2Constants.ENDPOINT_LOCAL_NAME);
>                if (axisEndpoint != null) {
>                    AxisBindingOperation axisBindingOperation =
>                            (AxisBindingOperation) axisEndpoint.getBinding()
>                                    .getChild(axisOperation.getName());
>                    msgctx
>                                        .setProperty(
>
>  Constants.AXIS_BINDING_MESSAGE,
>                                                        axisBindingOperation
>
>  .getChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE));
>                    msgctx.setProperty(Constants.AXIS_BINDING_OPERATION,
> axisBindingOperation);
>
> --
> View this message in context:
> http://www.nabble.com/java.lang.NullPointerException-AbstractDispatcher.invoke-tp18070227p18070227.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org

Re: java.lang.NullPointerException AbstractDispatcher.invoke

Posted by Mohan Radhakrishnan <ra...@gmail.com>.
Thanks. It is working.

Which build will this be part of ?

Mohan
-- 
View this message in context: http://www.nabble.com/java.lang.NullPointerException-AbstractDispatcher.invoke-tp18070227p18148961.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: java.lang.NullPointerException AbstractDispatcher.invoke

Posted by jijisv <ji...@gmail.com>.
Mohan,

I am facing this issue when I deploy the service in weblogic 9.2. The
current version I am using is Axis2-1.4.1 and i see the fix is missing in
the 1.4.1 source. 

Could you please point me which patch has this fix?

Thanks
Jiji
-- 
View this message in context: http://www.nabble.com/java.lang.NullPointerException-AbstractDispatcher.invoke-tp18070227p21557148.html
Sent from the Axis - User mailing list archive at Nabble.com.


Re: java.lang.NullPointerException AbstractDispatcher.invoke

Posted by Mohan Radhakrishnan <ra...@gmail.com>.
Thanks Sanka. I will try that.

I am going to use that patch with the final release build because the
nightly build uses JDK 5 ? We use 1.4

    [javac] bad class file: F:\tools\eclipse\src\web\WEB-INF\lib\axis
2-kernel-SNAPSHOT.jar(org/apache/axis2/AxisFault.class)
    [javac] class file has wrong version 49.0, should be 48.0
    [javac] Please remove or make sure it appears in the correct
subdirectory of
 the classpath.
    [javac] import org.apache.axis2.AxisFault;
    [javac]                         ^
    [javac] 1 error

Thanks,
Mohan
-- 
View this message in context: http://www.nabble.com/java.lang.NullPointerException-AbstractDispatcher.invoke-tp18070227p18128677.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: java.lang.NullPointerException AbstractDispatcher.invoke

Posted by Sanka Samaranayake <ss...@gmail.com>.
[1]
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AbstractDispatcher.java?r1=658726&r2=668095&pathrev=669834&view=patch
[2]
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AbstractDispatcher.java?r1=668095&r2=669834&pathrev=669834&view=patch

HTH

Sanka

On Thu, Jun 26, 2008 at 10:46 AM, Mohan Radhakrishnan <
radhakrishnan.mohan@gmail.com> wrote:

>
>  Hi,
>      Could you point me to the patch for this if it is not my code error ?
> I though I was using a simple WSDL with one operation ?
>
>
>
> Thanks,
> Mohan
> --
> View this message in context:
> http://www.nabble.com/java.lang.NullPointerException-AbstractDispatcher.invoke-tp18070227p18126719.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Sanka Samaranayake
WSO2 Inc.

http://sankas.blogspot.com/
http://www.wso2.org/

Re: java.lang.NullPointerException AbstractDispatcher.invoke

Posted by Mohan Radhakrishnan <ra...@gmail.com>.
 Hi,
      Could you point me to the patch for this if it is not my code error ?
I though I was using a simple WSDL with one operation ?



Thanks,
Mohan
-- 
View this message in context: http://www.nabble.com/java.lang.NullPointerException-AbstractDispatcher.invoke-tp18070227p18126719.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: java.lang.NullPointerException AbstractDispatcher.invoke

Posted by Sanka Samaranayake <ss...@gmail.com>.
I think this issue is fixed in the trunk.

Thanks,
Sanka

Mohan Radhakrishnan wrote:
> Hi,
>      Not sure what this exception means. I have also pasted the source code
> at the end. Line 122 is
>                     msgctx
> 					.setProperty(
> 							Constants.AXIS_BINDING_MESSAGE,
> 							axisBindingOperation
> 									.getChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE));
>
> ---------------------------------------------------------------
>
> org.apache.axis2.description.AxisService - Found axis operation: 
> org.apache.axis2.description.InOutAxisOperation@1ee5f07
> org.apache.axis2.i18n.resource::handleGetObject(operationfound)
> org.apache.axis2.engine.AbstractDispatcher - [MessageContext:
> logID=urn:uuid:2238BDBE9F1622487F1214229558385] Found AxisOperation :
> response
> org.apache.axis2.transport.http.AxisServlet - 
>
> java.lang.NullPointerException
> 	at
> org.apache.axis2.engine.AbstractDispatcher.invoke(AbstractDispatcher.java:122)
> 	at org.apache.axis2.engine.Phase.invoke(Phase.java:317)
> 	at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
>
> Thanks,
> Mohan
>
>                 msgctx.setAxisOperation(axisOperation);
>                 //setting axisMessage into messageContext
>                 msgctx.setAxisMessage(axisOperation.getMessage(
>                         WSDLConstants.MESSAGE_LABEL_IN_VALUE));
>                 AxisEndpoint axisEndpoint =
>                         (AxisEndpoint)
> msgctx.getProperty(WSDL2Constants.ENDPOINT_LOCAL_NAME);
>                 if (axisEndpoint != null) {
>                     AxisBindingOperation axisBindingOperation =
>                             (AxisBindingOperation) axisEndpoint.getBinding()
>                                     .getChild(axisOperation.getName());
>                     msgctx
> 					.setProperty(
> 							Constants.AXIS_BINDING_MESSAGE,
> 							axisBindingOperation
> 									.getChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE));
>                     msgctx.setProperty(Constants.AXIS_BINDING_OPERATION,
> axisBindingOperation);
>
>   
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG. 
> Version: 8.0.100 / Virus Database: 270.4.1/1515 - Release Date: 6/23/2008 7:16 PM
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org