Skip to content

Null reference at NHibernate.Util.AsyncReaderWriterLock.ReadLock() #2468

Closed
@michalstepien

Description

@michalstepien

Hi,
after upgrade NHibernate 5.2.7 -> 5.3.1, I have this error:

[NullReferenceException]
Object reference not set to an instance of an object.
   at NHibernate.Util.AsyncReaderWriterLock.ReadLock()
   at NHibernate.Cache.ReadWriteCache.Get(CacheKey key, Int64 txTimestamp)
   at NHibernate.Event.Default.DefaultLoadEventListener.LoadFromSecondLevelCache(LoadEvent event, IEntityPersister persister, LoadType options)
   at NHibernate.Event.Default.DefaultLoadEventListener.DoLoad(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options)
   at NHibernate.Event.Default.DefaultLoadEventListener.Load(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options)
   at NHibernate.Event.Default.DefaultLoadEventListener.ProxyOrLoad(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options)
   at NHibernate.Event.Default.DefaultLoadEventListener.OnLoad(LoadEvent event, LoadType loadType)
   at NHibernate.Impl.SessionImpl.FireLoad(LoadEvent event, LoadType loadType)
   at NHibernate.Impl.SessionImpl.InternalLoad(String entityName, Object id, Boolean eager, Boolean isNullable)
   at NHibernate.Type.EntityType.ResolveIdentifier(Object id, ISessionImplementor session)
   at NHibernate.Collection.Generic.PersistentGenericSet`1.InitializeFromCache(ICollectionPersister persister, Object disassembled, Object owner)
   at NHibernate.Cache.Entry.CollectionCacheEntry.Assemble(IPersistentCollection collection, ICollectionPersister persister, Object owner)
   at NHibernate.Event.Default.DefaultInitializeCollectionEventListener.Assemble(CacheKey ck, Object ce, ICollectionPersister persister, ISessionImplementor source, IPersistentCollection collection, Object collectionKey, Boolean alterStatistics)
   at NHibernate.Event.Default.DefaultInitializeCollectionEventListener.InitializeCollectionFromCache(Object collectionKey, ICollectionPersister persister, IPersistentCollection collection, ISessionImplementor source)
   at NHibernate.Event.Default.DefaultInitializeCollectionEventListener.OnInitializeCollection(InitializeCollectionEvent event)
   at NHibernate.Impl.SessionImpl.InitializeCollection(IPersistentCollection collection, Boolean writing)
   at NHibernate.Collection.AbstractPersistentCollection.Initialize(Boolean writing)
   at NHibernate.Collection.AbstractPersistentCollection.ReadElementExistence[T](T element, Nullable`1& existsInDb)
   at NHibernate.Collection.Generic.PersistentGenericSet`1.Contains(T item)

The error occurs during high load applications.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions