You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by John-M Baker <jo...@db.com> on 2008/01/09 17:48:51 UTC

Axis2 swallowing exceptions

Hi there,

I've used both Axis1 and 2 and both seem to have a horrible habit of 
swallowing exceptions. I've just spent a few hours trying to track down 
why serialisation was failing and it was only after I implemented my own 
RPCMessageReceiver did I discover a NullPointerException was being thrown 
while my objects were being serialised to XML. 

Please consider this code:

} catch(RuntimeException e) {
    log.error(e.getMessage(), e);; // ADDED
    throw AxisFault.makeFault(e);
} catch (Exception e) {
    String msg = "Exception occurred while trying to invoke service method 
" +
            method.getName();
    log.error(msg, e);
    throw AxisFault.makeFault(e);
}

It's at the end of RPCMessageReceiver. I've added one line that makes all 
the difference to debugging. Please could this be added to the next 
release so others do not waste their time trying to track errors? Also, if 
there are any other areas where exceptions are swallowed, can they be 
addressed too?

Thanks,


John Baker



---

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.

Re: Axis2 swallowing exceptions

Posted by Deepal Jayasinghe <de...@opensource.lk>.
hi John,
I justed add that line of code , so you will get that in the next
release [thank you very mush for your fix]

-Deepal
>
> Hi there,
>
> I've used both Axis1 and 2 and both seem to have a horrible habit of
> swallowing exceptions. I've just spent a few hours trying to track
> down why serialisation was failing and it was only after I implemented
> my own RPCMessageReceiver did I discover a NullPointerException was
> being thrown while my objects were being serialised to XML.
>
> Please consider this code:
>
> } catch(RuntimeException e) {
>     log.error(e.getMessage(), e);; // ADDED
>     throw AxisFault.makeFault(e);
> } catch (Exception e) {
>     String msg = "Exception occurred while trying to invoke service
> method " +
>             method.getName();
>     log.error(msg, e);
>     throw AxisFault.makeFault(e);
> }
>
> It's at the end of RPCMessageReceiver. I've added one line that makes
> all the difference to debugging. Please could this be added to the
> next release so others do not waste their time trying to track errors?
> Also, if there are any other areas where exceptions are swallowed, can
> they be addressed too?
>
> Thanks,
>
>
> John Baker
>
>
> ---
>
> This e-mail may contain confidential and/or privileged information. If
> you are not the intended recipient (or have received this e-mail in
> error) please notify the sender immediately and delete this e-mail.
> Any unauthorized copying, disclosure or distribution of the material
> in this e-mail is strictly forbidden.
>
> Please refer to http://www.db.com/en/content/eu_disclosures.htm for
> additional EU corporate and regulatory disclosures.




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