bug #10090
closedMany LIEs in cdmserver log for Team.getCollectorTitleCache()
100%
Description
from int cdmserver (startup.log)
Caused by: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: eu.etaxonomy.cdm.model.agent.Team.teamMembers, could not initialize proxy - no Session at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:606) ~[hibernate-core-5.4.33.Final.jar:5.4.33.Final] at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:218) ~[hibernate-core-5.4.33.Final.jar:5.4.33.Final] at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:162) ~[hibernate-core-5.4.33.Final.jar:5.4.33.Final] at org.hibernate.collection.internal.PersistentList.size(PersistentList.java:137) ~[hibernate-core-5.4.33.Final.jar:5.4.33.Final] at eu.etaxonomy.cdm.strategy.cache.agent.TeamDefaultCacheStrategy.getCache(TeamDefaultCacheStrategy.java:174) ~[cdmlib-model-5.32.0-SNAPSHOT.jar:?] at eu.etaxonomy.cdm.strategy.cache.agent.TeamDefaultCacheStrategy.getCollectorTitleCache(TeamDefaultCacheStrategy.java:167) ~[cdmlib-model-5.32.0-SNAPSHOT.jar:?] at eu.etaxonomy.cdm.strategy.cache.agent.TeamDefaultCacheStrategy.getCollectorTitleCache(TeamDefaultCacheStrategy.java:1) ~[cdmlib-model-5.32.0-SNAPSHOT.jar:?] at eu.etaxonomy.cdm.model.agent.Team.getCollectorTitleCache(Team.java:359) ~[cdmlib-model-5.32.0-SNAPSHOT.jar:?] ~~
Related issues
Updated by Andreas Müller 11 months ago
- Related to bug #9949: doGetSynonymy throws LIE in Mexico Portal added
Updated by Andreas Müller 11 months ago
- Status changed from New to Resolved
- % Done changed from 0 to 70
Applied in changeset cdmlib|6c536aa028a283ed2041899ac33a13baa41bcaeb.
Updated by Andreas Müller 11 months ago
The reason was a missing property path for secsource authors.
The reason why it happened for collectorTitleCache is that titleCaches are generally not computed if not null (related to #5849) and nomenclaturalTitleCaches in this test data are protected.
More generally spoken, the secundum authorteam is initialized by TitleAndNameCacheAutoInitializer but not necessarily the team members. Json serialization later (out of session) will try to read the authorteam bean and this throws an exception when team.getCollectorTitleCache() is called.
The final solution I decided for is now to catch LIEs in team.getCollectorTitleCache() if the precomputed collectorTitleCache is not null. This is acceptable as we do not expected the collectorTitleCache to be needed in this context and anyway the precomputed collectorTitleCache is correct in most cases.
Updated by Andreas Müller 11 months ago
- Assignee changed from Andreas Müller to Katja Luther
Should be fixed. Please review.
Updated by Andreas Müller 10 months ago
- Priority changed from Highest to Priority14
Updated by Andreas Müller 9 months ago
- Status changed from Resolved to Closed
- Assignee changed from Katja Luther to Andreas Müller
- % Done changed from 70 to 100