As discussed in issue 209515 the formatting of JSON response on GlassFish 3.1.1 is incompatible with what some clients expect. For example instead of expected
the GlassFish with Jersey version<2 responses with:
In vanilla JAX-RS case the solution can be:
A) add jackson-jaxrs-1.7.1.jar to project's classpath
B) return org.codehaus.jackson.jaxrs.JacksonJsonProvider provider in user's implementation of javax.ws.rs.core.Application.getClasses (eg. by calling Class.forName("org.codehaus.jackson.jaxrs.JacksonJsonProvider") which will succeed in runtime)
In Jersey case the solution is to add following parameter to Jersey's servlet:
It would be useful to know what's the proposed solution for Jersey 2.0, so we can make this future-proof and consistent with the future behavior.
The problem is not glassfish-only.
The same issue is valid for WL.
It's common Jersey-related issue.
Integrated into 'main-golden', will be available in build *201208020001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Denis Anisimov <email@example.com>