Hi You can register a custom WebApplicationException ExceptionMapper or may a custom JAXBElementProvider which overrides the parent's writeTo (or readFrom), catches an exception, creates a custom Response and then throws a WebApplicationException
cheers, Sergey On Mon, Jan 10, 2011 at 11:22 PM, Andrew <[email protected]> wrote: > When CXF encounters a class that is not JAXB compatible, it just sends a > text response to the client: > > JAXBException occurred : 1 counts of IllegalAnnotationExceptions. > > Log shows: > > 2011-01-10 16:00:36,932 WARN http-8080-1 > org.apache.cxf.jaxrs.provider.AbstractJAXBProvider - > com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of > IllegalAnnotationExceptions > com.foo.Status does not have a no-arg default constructor. > this problem is related to the following location: > > I would like it to throw an exception on the server-side, so that I can log > the error. I realize how to fix the problem, just that it will probably > happen again and would like to capture the fault. > > Thanks, > > Andrew >
