Hi,
I got the exception:
org.codehaus.jackson.map.JsonMappingException: failed to lazily initialize a collection of role: ... no session or session was closed ...
on an entity bean (ejb 3.1) that declared something like this:
@OneToMany(fetch=FetchType.LAZY,mappedBy = "post")
@XmlTransient
List<Comment> commentList;
The exception disappeared when I introduced the annotation:
org.codehaus.jackson.annotate.JsonIgnore (from the package org.jboss.resteasy:resteasy-jackson-provider)
on the same field.
Isn't it enough to put XmlTransient annotation over the field?
Thanks.
hi,
Same problem here. It seams a Jackson bug. Do you know which version of Jacson library uses JBoss AS 7.1.1?
Regards,
Esteve