Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-296
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HB-296
Summary: ConcurrentModificationException when initializing collection
Type: Bug
Status: Unassigned
Priority: Major
Project: Hibernate2
Components:
core
Versions:
2.1
Assignee:
Reporter: Mathias Bogaert
Created: Thu, 28 Aug 2003 6:49 AM
Updated: Thu, 28 Aug 2003 6:49 AM
Environment: 2.1 beta 2 from CVS
Description:
When initializing a collection, I get the following stacktrace (not seen with Hibernate 2.0.3):
8047 ERROR [tcpConnection-81-0] (webwork.dispatcher.ServletDispatcher:188) - Could not execute action
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.remove(HashMap.java:801)
at net.sf.hibernate.impl.SessionImpl.endLoadingCollections(SessionImpl.java:2973)
at net.sf.hibernate.loader.Loader.doResultSet(Loader.java:224)
at net.sf.hibernate.loader.Loader.doFind(Loader.java:113)
at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:720)
at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:703)
at net.sf.hibernate.loader.OneToManyLoader.initialize(OneToManyLoader.java:74)
at net.sf.hibernate.impl.SessionImpl.initialize(SessionImpl.java:3101)
at net.sf.hibernate.collection.PersistentCollection.forceLoad(PersistentCollection.java:236)
at net.sf.hibernate.Hibernate.initialize(Hibernate.java:255)
at com.intrasoft.persistence.hibernate.HibernatePersistenceService.initialize(HibernatePersistenceService.java:143)
at com.intrasoft.sysaudit.mission.action.wizard.AbstractMissionStepAction.initializeMission(AbstractMissionStepAction.java:112)
at com.intrasoft.sysaudit.mission.action.wizard.AbstractMissionStepAction.saveMissionInSession(AbstractMissionStepAction.java:74)
at com.intrasoft.sysaudit.mission.action.wizard.MissionStep1.doExecute(MissionStep1.java:173)
at com.opensymphony.xwork.ActionSupport.execute(ActionSupport.java:31)
Here is my code:
if (mission.getUnit() != null) {
persistenceService.initialize(mission.getUnit().getUsers());
}
and in HibernatePersistenceService:
public void initialize(Object objectToInitialize) {
try {
if (!Hibernate.isInitialized(objectToInitialize)) {
Hibernate.initialize(objectToInitialize);
}
}
catch (HibernateException e) {
throw new InfrastructureException(e);
}
}
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
|