users@jersey.java.net

Re: [Jersey] Problem: Jersey swallows all JAXP exceptions silently !

From: Morten <mortench2004_at_yahoo.dk>
Date: Fri, 24 Jul 2009 10:06:09 +0000 (GMT)

--- Den fre 24/7/09 skrev Paul Sandoz <Paul.Sandoz_at_Sun.COM>: > Did a 500 error get returned to the client? Did an > exception logged on the server side? If so can you send the > stack trace to me (i would like to know if we can improve > the logging in this area). Amazingly, I get a 200 OK response but with otherwise blank result. I got NO stack trace and no visible exceptions. The reason I know that an exception is throw is because of the blank result + I DO get an exception show only IF I insert the following extra lines in my jersey controller method: JAXBContext c Marshaller m = context1.createMarshaller(); m.marshal(x, System.err);ontext1 = JAXBContext.newInstance( SomeObject.class ); Exception trace extract: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 4 counts of IllegalAnnotationExceptions JAXB annotation is placed on a method that is not a JAXB property this problem is related to the following location: at @javax.xml.bind.annotation.XmlElement(nillable=false, name=##default, required=false, defaultValue=