Nikhil Agrawal
Nikhil Agrawal

Reputation: 21

Getting error SEVERE: MessageBodyWriter not found for media type=application/xml,

Jersey GET/POST call throws following error after upgrading jaxrs and jaxws jar to latest version in my project:

org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor aroundWriteTo
SEVERE: MessageBodyWriter not found for media type=application/xml, type=class java.util.ArrayList, genericType=java.util.List<javax.xml.bind.JAXBElement<com.play.ClassBase>

It is working fine for Accept:application/json, but for application/xml.I am getting error.How to fix it?

Upvotes: 1

Views: 2699

Answers (1)

Luis Rodr&#237;guez
Luis Rodr&#237;guez

Reputation: 126

Please, verify that you have the jersey-media-jaxb.jar in your lib folder of your application.

Upvotes: 1

Related Questions