I am implementing small application for rest webservice and want to get response in json formate. But I am getting this error on my Eclipse
console .
Please help me out.
org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor aroundWriteTo
SEVERE: MessageBodyWriter not found for media type=application/json, type=class book.Test, genericType=class book.Test.
All Jar files :
I have added all dependencies jar but still i am getting the same error.
Thanks.
Looks like you're missing a dependency: you enabled the POJOMappingFeature
in the settings so you need to include jersey-media-moxy
or jersey-media-json-jackson
in your dependencies. Since your beans have JAXB annotation I guess you'll want both XML and JSON serialization, so MOXy is your choice.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.