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