-
1. Re: org.jboss.resteasy.core.NoMessageBodyWriterFoundFailure: Could not find MessageBodyWriter for response object of type: <MyClass> of media type: application/json
nitin.shukla Nov 11, 2019 9:06 AM (in response to nitin.shukla)Hello,
I further release that on starting the JBoss server I have following warning message.
[org.jboss.modules] Failed to define class org.jboss.resteasy.plugins.providers.jackson.ResteasyJacksonProvider in Module "deployment.pricing.war:main" from Service Module Loader: java.lang.NoClassDefFoundError: Failed to link org/jboss/resteasy/plugins/providers/jackson/ResteasyJacksonProvider (Module "deployment.pricing.war:main" from Service Module Loader): org/codehaus/jackson/jaxrs/JacksonJsonProvider
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
I am not clear if I am missing setting up anything in JBoss module to make use of JSON provider. Any pointers to resolve the issue is appreciated.
Thanks.
-
2. Re: org.jboss.resteasy.core.NoMessageBodyWriterFoundFailure: Could not find MessageBodyWriter for response object of type: <MyClass> of media type: application/json
lafr Nov 11, 2019 2:37 PM (in response to nitin.shukla)From the error message I'd say you also need
<!-- https://mvnrepository.com/artifact/org.codehaus.jackson/jackson-jaxrs -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
<version>1.9.13</version>
</dependency>
-
3. Re: org.jboss.resteasy.core.NoMessageBodyWriterFoundFailure: Could not find MessageBodyWriter for response object of type: <MyClass> of media type: application/json
nitin.shukla Nov 12, 2019 2:49 AM (in response to lafr)Thank you Frank. This indeed resolved the issue. Mine is an old Web application and doesn't use Maven, however placing the relevant jackson jars resolved the issue. Thank you.