0

While migrating rest-easy jaxrs 2.1.0 GA jar to 3.0.12.final jar by using jetty 6.1.11 getting exception like:

org.jboss.resteasy.plugins.providers.jaxb.JAXBMarshalException: A valid XmlRegistry could not find

Ahmed Ashour
  • 5,179
  • 10
  • 35
  • 56

1 Answers1

0

If you are dealing with complex objects, annotate your main object with

@XmlRootElement(name = "Document")

For e.g: If you are getting this exception when you hit a resource, annotate the body object of that API with XmlRootElement.

....
@XmlRootElement(name = "Document")
public class Person {
   @XmlElement(name = "Id")
   private int id;
   @XmlElement(name = "Name")
   private String name;
....
}
Irshad
  • 488
  • 5
  • 6