Jersey fails with "IllegalStateException: No JAXB provider found for the following JAXB context" on JBoss EAp 6

Solution Verified - Updated -

Issue

 java.lang.IllegalStateException: No JAXB provider found for the following JAXB context: class com.sun.xml.bind.v2.runtime.JAXBContextImpl
        at com.sun.jersey.json.impl.JSONHelper.getJaxbProvider(JSONHelper.java:106)
        at com.sun.jersey.json.impl.DefaultJaxbXmlDocumentStructure.getXmlDocumentStructure(DefaultJaxbXmlDocumentStructure.java:76)
        at com.sun.jersey.json.impl.writer.Stax2JacksonWriter.<init>(Stax2JacksonWriter.java:169)
        at com.sun.jersey.json.impl.Stax2JsonFactory.createWriter(Stax2JsonFactory.java:105)
        at com.sun.jersey.json.impl.Stax2JsonFactory.createWriter(Stax2JsonFactory.java:85)
        at com.sun.jersey.json.impl.BaseJSONMarshaller.getXMLStreamWriter(BaseJSONMarshaller.java:111)
        at com.sun.jersey.json.impl.BaseJSONMarshaller.marshallToJSON(BaseJSONMarshaller.java:106)
        ...

Environment

  • JBoss Enterprise Application Platform (EAP) 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content