users@glassfish.java.net

Re: Exception [EclipseLink-6004] on Jersey layer (glassfish 3.0.1 b18) ejb 3.1

From: <glassfish_at_javadesktop.org>
Date: Sat, 15 May 2010 02:58:34 PDT

Well i have found that modifing rest method to lazy fetch child field (user with id: 1) before jersey will marshal to xml:
--------------------------------------------------------
 @GET
    @Path("{itemid}")
    @Override
    public User read(@javax.ws.rs.PathParam("itemid") Long id) {
            logger.debug("before userDao.read(id)");
            User retval = dao.read(id);
            logger.debug("after userDao.read(id)" + retval.getCreatedByUser().getEmail() + ", " + retval.getUpdatedByUser().getEmail());
            
        return retval;
    }
--------------------------------------------------------
cures the situation, there is no exception on jersey servlet during first invocation of method. This is very strange, but it is no workaround since this looks like a bug in container probably.
[Message sent by forum member 'jszczepankiewicz']

http://forums.java.net/jive/thread.jspa?messageID=469931