Hello,
I am having occasionally getting a NullPointerException in a multi threaded context.
I have one transaction for each thread. The threads are loading parrallel all the data a user needs to login. So they can work in a read only context.
My only theory is that while these threads are running the database is being mutated from another source, ie another user.
If that is the case does anyone have any clues how I can prevent this from happening?
I have seen that there was an age old bug that also threw a NPE in this same place but it was supposedly fixed a long time ago.
Any help would be grand.
Regards
Caused by: java.lang.NullPointerException at org.hibernate.event.def.AbstractLockUpgradeEventListener.upgradeLock(AbstractLockUpgradeEventListener.java:62) at org.hibernate.event.def.DefaultLoadEventListener.loadFromSessionCache(DefaultLoadEventListener.java:551) at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:440) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:285) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1090) at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1038) at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:630) at org.hibernate.type.EntityType.resolve(EntityType.java:438) at org.hibernate.type.EntityType.nullSafeGet(EntityType.java:234) at org.hibernate.persister.collection.AbstractCollectionPersister.readElement(AbstractCollectionPersister.java:763) at org.hibernate.collection.PersistentSet.readFrom(PersistentSet.java:341) at org.hibernate.loader.Loader.readCollectionElement(Loader.java:1156) at org.hibernate.loader.Loader.readCollectionElements(Loader.java:774) at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:622) at org.hibernate.loader.Loader.doQuery(Loader.java:829) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274) at org.hibernate.loader.Loader.loadCollection(Loader.java:2166) at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:62) at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:627) at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:83) at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1863) at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:369) at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:111) at org.hibernate.collection.PersistentSet.iterator(PersistentSet.java:186)
|