[OS-JIRA] Created: (CAY-146) ConcurrentModificationException during validation

From: jir..bjectstyle.org
Date: Sun Jun 13 2004 - 18:00:46 EDT

  • Next message: jir..bjectstyle.org: "[OS-JIRA] Created: (CAY-147) Tried to reengineer and got exception"

    Message:

      A new issue has been created in JIRA.

    ---------------------------------------------------------------------
    View the issue:

      http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-146

    Here is an overview of the issue:
    ---------------------------------------------------------------------
            Key: CAY-146
        Summary: ConcurrentModificationException during validation
           Type: Bug

         Status: Assigned
       Priority: Critical

        Project: Cayenne
     Components:
                 Cayenne Core Library
       Fix Fors:
                 1.1 [DEV]
       Versions:
                 1.1 [DEV]

       Assignee: Andrus Adamchik
       Reporter: Andrus Adamchik

        Created: Sun, 13 Jun 2004 5:59 PM
        Updated: Sun, 13 Jun 2004 5:59 PM

    Description:
    If DataObject's validateForSave indirectly modifies ObjectStore, a ConcurrentModificationException is thrown:

    http://objectstyle.org/cayenne/lists/cayenne-user/2004/06/0092.html

    Test DataObject that shows how to reproduce the problem:

       class MockupActiveValidatingObject extends CayenneDataObject {

            public void validateForSave(ValidationResult validationResult) {
                // create a new object on validation... this will end up in the ObjectStore
                // so lets see how the ObjectStore can handle this operation during
                // validation....
                getDataContext().createAndRegisterNewObject(Artist.class);
            }
        }

    Stack trace:

    java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782) at java.util.HashMap$ValueIterator.next(HashMap.java:812) at org.objectstyle.cayenne.access.ObjectStore.validateUncommittedObjects(ObjectStore.java:901) at

    ---------------------------------------------------------------------
    JIRA INFORMATION:
    This message is automatically generated by JIRA.

    If you think it was sent incorrectly contact one of the administrators:
       http://objectstyle.org/jira/secure/Administrators.jspa

    If you want more information on JIRA, or have a bug to report see:
       http://www.atlassian.com/software/jira



    This archive was generated by hypermail 2.0.0 : Sun Jun 13 2004 - 18:00:48 EDT