The Source for Java Technology Collaboration
User: Password:



Kohsuke Kawaguchi

Kohsuke Kawaguchi's Blog

JAX-WS RI now sends the server side stack trace over the network

Posted by kohsuke on December 18, 2006 at 05:09 PM | Comments (2)

One of a very common problem that people (especially new people) faces in the remoting system like JAX-WS is this. Your server throws an unexpected exception. You get an error on the client saying "server reported an error", and you'd like to better find out what's going on in the server, but you don't know how.

So to make the JAX-WS RI easier to use, I just implemented a mechanism where the server side exception stack trace (complete with all nested exceptions) is captured in the SOAP fault message. This allows the JAX-WS RI client to reconstruct the exception, and so when you dump the exception on the client side, you'll see the complete stack trace on the server.

This change should be in the final release of JAX-WS RI 2.1, which should be "soon."


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Make sure that the stack trace doesn't have a JDBC connection string in it, complete with username and password.... you might want to have this off by default, and inform folks to make sure it is off on production systems.

    Best,
    Brad Neuberg

    Posted by: bradneuberg on December 19, 2006 at 01:53 AM

  • Is this still valid in the Glassfish v2. When I tried this on a web-service using the Tester in the glassfish admin console I get:

    Service invocation threw an exception with message : null; Refer to the server log for more details

    What's the best way to pass the exception to a PHP client?

    Posted by: r_sudh on October 18, 2007 at 07:53 PM



Only logged in users may post comments. Login Here.


Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds