I've found that the problem is not related to the @ElementCollection relation, it occurs if the parent entity has any uninitialized lazy loading associations.