Jersey 1 to 2 Migration, using org.codehaus.jettison packages (MessageBodyWriter not found for media type=application/json) -
updating osgi/spring web application jersey 2. things compiling , installing fine jersey 2, error when our resources accessed:
messagebodywriter not found media type=application/json, type=class org.codehaus.jettison.json.jsonobject, generictype=class org.codehaus.jettison.json.jsonobject.
current configuration details org.codehaus.jettison.json ‘media provider’ jersey.
• added dependency on jersey-media-json-jettison
• i’m specifying org.codehaus package here in web.xml glassfish specific init-param:
<init-param> <param-name>jersey.config.server.provider.packages</param-name> <param-value> org.codehaus.jettison.json, ... </param-value> </init-param>
• added package our webapp bundles bnd file:
org.codehaus.jettison.json,\
which shows it’s importing in osgi console:
imported packages org.codehaus.jettison.json; version="1.3.3"
console shows package being used jersey-media-json-jettison bundle:
packages org.codehaus.jettison.json org.codehaus.jettison.json; version="1.3.3"<org.codehaus.jettison.jettison_1.3.3 [121]> org.glassfish.jersey.media.jersey-media-json-jettison_2.22.1 [192]
any ideas what's missing here configure json provider?
does using org.codehaus.jettison
packages require programmatic configuration work json provider?
am asking right questions?
thank you, tom
Comments
Post a Comment