On Tue, Apr 22, 2008 at 12:32 PM, Daniel Kulp <[EMAIL PROTECTED]> wrote:

> On Monday 21 April 2008, greenstar wrote:
> > It appears to print Exception.getMessage().  NullPointerException has
> > no message, which explains why it prints null in this case.
> >
> > How can I configure CXF to print the exception class and optionally
> > the stack trace (on the server)?
>
> This actually changed in 2.0.5.  In 2.0.4, we logged stack traces for
> everything, which users complained about as they got stack traces for
> all the exceptions/faults that the wanted sent back to the clients.
>
> In anycase, if you set the logging level for the java.util.logging to
> FINE for the org.apache.cxf.phase.PhaseInterceptorChain logger, the
> stack traces should show up.
>
> Dan


Thanks for the information, Dan.

I think not logging the stack traces by default is a good idea.  However, In
my opinion, the Exception class name should be logged by default.
Currently, only Exception.getMessage() is logged, which makes it difficult
to see what kinds of exceptions are being thrown when no exception message
is set (ie: NullPointerException, or any exception for which the semantics
of the exception are not included in "message").


>
>
>
> >
> > greenstar wrote:
> > > I have recently upgraded from XFire 1.2.6 to CXF 2.0.5, (within
> > > JBoss 4.2.0.GA/Java1.6.0_06).
> > >
> > > When using JAXWS, when my services throws an exception from the
> > > "business" code, the exception stack is not logged.  For example,
> > > when my application throws a NullPointerException, only the
> > > following is mentioned in the log (instead of printing that stack
> > > trace or the exception class at the very least):
> > >
> > >   15:36:41,796 ERROR [STDERR] Apr 21, 2008 3:36:41 PM
> > > org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> > >   INFO: Application has thrown exception, unwinding now: null
> > >
> > > ...
>
>
>
> --
> J. Daniel Kulp
> Principal Engineer, IONA
> [EMAIL PROTECTED]
> http://www.dankulp.com/blog
>

Reply via email to