-
Support Patch
-
Resolution: Done
-
Major
-
EAP 6.0.0
-
None
I have a bean with a @OneToMany relation mapping like
private List<TherapieeinheitBean> therapieeinheiten;
@OneToMany(
cascade =
Unknown macro:
,
fetch = FetchType.EAGER,
mappedBy="therapiekatalog"
)
with FetchType.EAGER and a simnple @PostLoad like
@PostLoad
public void postLoad()
Unknown macro:
When an entity of this bean is loaded JBoss trows
org.hibernate.LazyInitializationException: illegal access to loading collection
at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:341)
at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:249)
at de.visiodesk.therapiekatalog.TherapiekatalogBean.postLoad(TherapiekatalogBean.java:170)
.
.
.
and prints the messages
WARN [LoadContexts] fail-safe cleanup (collections) : org.hibernate.engine.loading.CollectionLoadContext@2c8ce9<rs=Ingres-ResultSet[18523]>
WARN [CollectionLoadContext] On CollectionLoadContext#cleanup, localLoadingCollectionKeys contained [206] entries
afterwards. The PostLoad method should be called after the data was completely loaded. Is there a workaround for this Problem? I found some other ressources on the net where peole had the same problem, but I saw no resolution, no hint, no workaround.