#8 LazyInitializationException while population is running

open
None
2
2010-05-21
2010-05-21
Kai Eckert
No

See stack trace below. This is caused by the current database setup: H2 is in embedded mode and allows only one concurrent access. The hibernate session is disconnected while another thread (in this case population) runs directly on the database. If you now reload the visualisation or do something else that causes Semtinel to access the data, this exception is thrown.

Stacktrace:

org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.semtinel.core.data.hibernate.ConceptImpl.narrower, session is disconnected
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:353)
at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:97)
at org.hibernate.collection.PersistentBag.size(PersistentBag.java:225)
at org.semtinel.core.visuals.treemap.ConceptTreemapData.getTMSizeMetric(ConceptTreemapData.java:128)
at org.kaiec.treemap.layout.SquarifiedLayout.Layout(SquarifiedLayout.java:103)
at org.kaiec.treemap.layout.SquarifiedLayout.layoutrow(SquarifiedLayout.java:185)
at org.kaiec.treemap.layout.SquarifiedLayout.squarify(SquarifiedLayout.java:132)
at org.kaiec.treemap.layout.SquarifiedLayout.squarify(SquarifiedLayout.java:127)
at org.kaiec.treemap.layout.SquarifiedLayout.squarify(SquarifiedLayout.java:127)
at org.kaiec.treemap.layout.SquarifiedLayout.squarify(SquarifiedLayout.java:127)
at org.kaiec.treemap.layout.SquarifiedLayout.squarify(SquarifiedLayout.java:127)
at org.kaiec.treemap.layout.SquarifiedLayout.Layout(SquarifiedLayout.java:111)
at org.kaiec.treemap.layout.SquarifiedLayout.layoutrow(SquarifiedLayout.java:193)
at org.kaiec.treemap.layout.SquarifiedLayout.squarify(SquarifiedLayout.java:132)
at org.kaiec.treemap.layout.SquarifiedLayout.squarify(SquarifiedLayout.java:127)
at org.kaiec.treemap.layout.SquarifiedLayout.squarify(SquarifiedLayout.java:127)
at org.kaiec.treemap.layout.SquarifiedLayout.squarify(SquarifiedLayout.java:127)
at org.kaiec.treemap.layout.SquarifiedLayout.squarify(SquarifiedLayout.java:127)
at org.kaiec.treemap.layout.SquarifiedLayout.Layout(SquarifiedLayout.java:111)
at org.kaiec.treemap.CalculationThread.run(CalculationThread.java:46)

Discussion