JAXB annotations appear to be missing from classes in JBoss EAP 6
Issue
- While executing the following code snippet:
import com.redhat.gss.MyObject;
import javax.xml.bind.JAXBContext;
JAXBContext jc = JAXBContext.newInstance(MyObject.class);
- It runs fine in a standalone environment, but in JBoss, getting the following error:
Caused by: com.sun.istack.SAXException2:
unable to marshal type "com.my.example.request.Payment" as an element
because it is missing an @XmlRootElement annotation
- The
@XmlRootElement
annotation is present onMyObject
, though. Why can't JAXB see it?
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.