From: <leg...@at...> - 2003-08-28 19:45:28
|
The following comment has been added to this issue: Author: Gavin King Created: Thu, 28 Aug 2003 2:44 PM Body: whoa! Thats bad.... But I'm looking at the code and I just don't see how it could occur! Can you please submit a main() method to reproduce this? It doesn't occur in tests and the code certainly LOOKS correct. I'm stumped! p.s. I suppose you are _absolutely_ certain you aren't hitting the session from multiple threads.... --------------------------------------------------------------------- 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 |
From: <leg...@at...> - 2003-08-28 20:58:28
|
The following comment has been added to this issue: Author: Mathias Bogaert Created: Thu, 28 Aug 2003 3:56 PM Body: I'm not 100% sure, but 99%. I'll check again tomorrow and see if I can submit a test case to reproduce it. The strangest thing is that it works as expected using the 2.0.3 version, doing the exact same thing! --------------------------------------------------------------------- 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: Assigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 Assignee: Gavin King Reporter: Mathias Bogaert Created: Thu, 28 Aug 2003 6:49 AM Updated: Thu, 28 Aug 2003 3:41 PM 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 |
From: <leg...@at...> - 2003-09-04 11:33:27
|
The following comment has been added to this issue: Author: Mathias Bogaert Created: Thu, 4 Sep 2003 6:32 AM Body: After verifying it, I'm _certain_ I'm not accessing it from different threads. It has something to do with the object that is removed from the hashmap (and that is in the collection being initialized) already was loaded by the session before. I'll continue trying to reproduce in a testcase. --------------------------------------------------------------------- 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: Assigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 Assignee: Gavin King Reporter: Mathias Bogaert Created: Thu, 28 Aug 2003 6:49 AM Updated: Thu, 28 Aug 2003 3:41 PM 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 |
From: <leg...@at...> - 2003-09-25 21:09:55
|
The following comment has been added to this issue: Author: Gavin King Created: Thu, 25 Sep 2003 4:08 PM Body: Also see HB-339 --------------------------------------------------------------------- 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: Assigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 Assignee: Gavin King Reporter: Mathias Bogaert Created: Thu, 28 Aug 2003 6:49 AM Updated: Thu, 28 Aug 2003 3:41 PM 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 |
From: <leg...@at...> - 2003-10-20 14:33:30
|
The following comment has been added to this issue: Author: Mathias Bogaert Created: Mon, 20 Oct 2003 5:11 AM Body: Tried again with the latest Hibernate 2.1 (CVS from yesterday) and I'm unable to reproduce the problem. So it seems to have resolved itself! --------------------------------------------------------------------- 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: Assigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 Assignee: Gavin King Reporter: Mathias Bogaert Created: Thu, 28 Aug 2003 6:49 AM Updated: Thu, 28 Aug 2003 3:41 PM 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 |