AbstractPersistentCollection throws NullPointerException in highly concurrent situation

Description

Lately when doing stress test, a NullPointerException was sometimes being thrown within Hibernate class AbstractPersistentCollection. The excpetion happened only in highly concurrent situation.

We're using Websphere, here's the stack trace in Webshpere's log.
[7/19/11 12:31:59:679 EDT] 00000039 SystemErr R java.lang.NullPointerException
[7/19/11 12:31:59:680 EDT] 00000039 SystemErr R at org.hibernate.collection.AbstractPersistentCollection.isConnectedToSession(AbstractPersistentCollection.java:196)
[7/19/11 12:31:59:680 EDT] 00000039 SystemErr R at org.hibernate.collection.AbstractPersistentCollection.setCurrentSession(AbstractPersistentCollection.java:429)
[7/19/11 12:31:59:681 EDT] 00000039 SystemErr R at org.hibernate.event.def.OnLockVisitor.processCollection(OnLockVisitor.java:61)
[7/19/11 12:31:59:681 EDT] 00000039 SystemErr R at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:124)
[7/19/11 12:31:59:681 EDT] 00000039 SystemErr R at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:84)
[7/19/11 12:31:59:681 EDT] 00000039 SystemErr R at org.hibernate.event.def.AbstractVisitor.processEntityPropertyValues(AbstractVisitor.java:78)
[7/19/11 12:31:59:681 EDT] 00000039 SystemErr R at org.hibernate.event.def.AbstractVisitor.process(AbstractVisitor.java:146)
[7/19/11 12:31:59:681 EDT] 00000039 SystemErr R at org.hibernate.event.def.AbstractReassociateEventListener.reassociate(AbstractReassociateEventListener.java:102)
[7/19/11 12:31:59:682 EDT] 00000039 SystemErr R at org.hibernate.event.def.DefaultLockEventListener.onLock(DefaultLockEventListener.java:82)
[7/19/11 12:31:59:682 EDT] 00000039 SystemErr R at org.hibernate.impl.SessionImpl.fireLock(SessionImpl.java:611)
[7/19/11 12:31:59:682 EDT] 00000039 SystemErr R at org.hibernate.impl.SessionImpl.lock(SessionImpl.java:603)
[7/19/11 12:31:59:682 EDT] 00000039 SystemErr R at com.silanis.idmgr.request.ConfigurationCache.shouldRefresh(ConfigurationCache.java:99)
[7/19/11 12:31:59:682 EDT] 00000039 SystemErr R at com.silanis.idmgr.request.ConfigurationCache.getConfiguration(ConfigurationCache.java:59)

Further investigation revealed the line of code in our application that caused the exception:
session.lock( config, LockMode.READ);

It's certain that neither session nor config object is null when the call is made. config is a persistent object which has associations and collections of other entity instances. We use lock function to perform a version check.

Environment

Websphere + AIX + DB2 9.7.4

Activity

Show:
Brett Meyer
April 7, 2014, 5:47 PM

In an effort to clean up, in bulk, tickets that are most likely out of date, we're transitioning all ORM 3 tickets to an "Awaiting Test Case" state. Please see http://in.relation.to/Bloggers/HibernateORMJIRAPoliciesAndCleanUpTactics for more information.

If this is still a legitimate bug in ORM 4, please provide either a test case that reproduces it or enough detail (entities, mappings, snippets, etc.) to show that it still fails on 4. If nothing is received within 3 months or so, we'll be automatically closing them.

Thank you!

Brett Meyer
July 8, 2014, 3:11 PM

Bulk rejecting stale issues. If this is still a legitimate issue on ORM 4, feel free to comment and attach a test case. I'll address responses case-by-case. Thanks!

Rejected

Assignee

Unassigned

Reporter

Y

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major