users@jersey.java.net

_at_PathParam("id") Serializable login ??

From: Felipe Gaścho <fgaucho_at_gmail.com>
Date: Fri, 14 Aug 2009 19:40:14 +0200

I tried to use Serializable as PathParam type, but the Glassfish thrown:

com.sun.jersey.api.container.ContainerException: Method, public
com.kenai.puj.arena.model.entity.VersionedEntity
net.java.dev.footprint.service.http.PujGenericResource.select(java.io.Serializable),
annotated with GET of resource, class
net.java.dev.footprint.service.http.PujGenericResource, is not
recognized as valid Java method annotated with @HttpMethod.


        @GET
        @Produces( { MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
        @Path("{id}")
        public T select(@PathParam("id") Serializable login) {
                return getFacade().read(login);
        }


* if I change it to integer or String, it works normally...... but
since Serializable is the JPA interface I was looking for using that
type :)