Having a strange issue, using jersey 1.3 with grizzly 1.9.18 and have
the following code:
@Path("/v1/profile")
public class ProfileResource extends BaseResource {
.....
@POST
@Path("/create")
@Consumes("application/x-www-form-urlencoded")
@Produces("application/json")
public Response createProfile(MultivaluedMap<String, String> formParams) {
...
things work fine if run via maven:
mvn clean compile exec:java
using curl: curl -v -i -X POST --data "name=blah......"
http://localhost:4080/v1/profile/create
However when I package it into a jar using maven-assembly-plugin
jar-with-dependencies things break with POST only, get the following
error:
Aug 24, 2010 1:33:59 PM com.sun.jersey.spi.container.ContainerRequest getEntity
SEVERE: A message body reader for Java class
javax.ws.rs.core.MultivaluedMap, and Java type
javax.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.String>,
and MIME media type application/x-www-for
m-urlencoded was not found
Aug 24, 2010 1:33:59 PM com.sun.jersey.spi.container.ContainerRequest getEntity
SEVERE: The registered message body readers compatible with the MIME
media type are:
*/* ->
com.sun.jersey.json.impl.provider.entity.JSONJAXBElementProvider$General
com.sun.jersey.json.impl.provider.entity.JSONArrayProvider$General
com.sun.jersey.json.impl.provider.entity.JSONObjectProvider$General
com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider$General
com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$General
Anyone have any ideas?