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 Andrew Clegg <an...@gmail.com> on 2008/06/27 12:31:49 UTC

faultstring unknown: nomination for the world's least useful error message

Morning all,

A question for the Axis team. When a method in my class implementing a
web service (Axis2 1.3, ADB) causes a NullPointerException, the SOAP
response I get back looks like this:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Server</faultcode>
         <faultstring>unknown</faultstring>
         <detail/>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

This isn't terribly informative and required me to step through the
code using remote debugging in order to find the problem. It doesn't
tell you that a Java exception has occurred at all, let alone what
kind or where it is. Also, no clues show up in the server logs, even
at the DEBUG level.

Is there an easy way to have Axis2 pass the contents of the exception
back in the message?

Thanks,

Andrew.

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


Re: faultstring unknown: nomination for the world's least useful error message

Posted by Andrew Clegg <an...@gmail.com>.
2008/6/27 keith chapman <ke...@gmail.com>:
> Try setting these two parameters in your axis2.xml
>
>     <parameter name="sendStacktraceDetailsWithFaults">true</parameter>
>
>     <parameter name="DrillDownToRootCauseForFaultReason">true</parameter>

Brilliant! Thanks.

Andrew.

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


Re: faultstring unknown: nomination for the world's least useful error message

Posted by keith chapman <ke...@gmail.com>.
Try setting these two parameters in your axis2.xml

<!--During a fault, stacktrace can be sent with the fault message. The
following flag will control -->
    <!--that behaviour.-->
    <parameter name="sendStacktraceDetailsWithFaults">true</parameter>

    <!--If there aren't any information available to find out the fault
reason, we set the message of the expcetion-->
    <!--as the faultreason/Reason. But when a fault is thrown from a service
or some where, it will be -->
    <!--wrapped by different levels. Due to this the initial exception
message can be lost. If this flag-->
    <!--is set then, Axis2 tries to get the first exception and set its
message as the faultreason/Reason.-->
    <parameter name="DrillDownToRootCauseForFaultReason">true</parameter>

Thanks,
Keith.

On Fri, Jun 27, 2008 at 4:01 PM, Andrew Clegg <an...@gmail.com>
wrote:

> Morning all,
>
> A question for the Axis team. When a method in my class implementing a
> web service (Axis2 1.3, ADB) causes a NullPointerException, the SOAP
> response I get back looks like this:
>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> ">
>   <soapenv:Body>
>      <soapenv:Fault>
>         <faultcode>soapenv:Server</faultcode>
>         <faultstring>unknown</faultstring>
>         <detail/>
>      </soapenv:Fault>
>   </soapenv:Body>
> </soapenv:Envelope>
>
> This isn't terribly informative and required me to step through the
> code using remote debugging in order to find the problem. It doesn't
> tell you that a Java exception has occurred at all, let alone what
> kind or where it is. Also, no clues show up in the server logs, even
> at the DEBUG level.
>
> Is there an easy way to have Axis2 pass the contents of the exception
> back in the message?
>
> Thanks,
>
> Andrew.
>
> ---------------------------------------------------------------------
> 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