[JIRA] Created: (CAY-695) NullPointerException in CDO. removeToManyTarget

From: Tore Halset (JIRA) ("Tore)
Date: Wed Oct 18 2006 - 03:17:31 EDT

  • Next message: Bill Dudney: "moving tutorials"

    NullPointerException in CDO. removeToManyTarget
    -----------------------------------------------

             Key: CAY-695
             URL: http://issues.apache.org/cayenne/browse/CAY-695
         Project: Cayenne
            Type: Bug

      Components: Cayenne Core Library
        Versions: 2.0 [STABLE]
     Environment: 2.0.1 incubator downloaded 17/10 2006.
        Reporter: Tore Halset

    I sometimes (ca 1 out of 3 runs of my application junit test) get the following NPE when deleting a object.

    java.lang.NullPointerException
            at org.apache.cayenne.CayenneDataObject.removeToManyTarget(CayenneDataObject.java:272)
            at org.apache.cayenne.access.DataContextDeleteAction.processDeleteRules(DataContextDeleteAction.java:203)
            at org.apache.cayenne.access.DataContextDeleteAction.deletePersistent(DataContextDeleteAction.java:108)
            at org.apache.cayenne.access.DataContextDeleteAction.performDelete(DataContextDeleteAction.java:98)
            at org.apache.cayenne.access.DataContextDeleteAction.processDeleteRules(DataContextDeleteAction.java:227)
            at org.apache.cayenne.access.DataContextDeleteAction.deletePersistent(DataContextDeleteAction.java:108)
            at org.apache.cayenne.access.DataContextDeleteAction.performDelete(DataContextDeleteAction.java:98)
            at org.apache.cayenne.access.DataContext.deleteObject(DataContext.java:1008)

    It happens in the following block of code:
            getDataContext().getObjectStore().recordArcDeleted(
                    this,
                    value != null ? value.getObjectId() : null,
                    relName);

    Debugging show that "this" is transient and missing DataContext when the NPE happens.

    -- 
    This message is automatically generated by JIRA.
    -
    If you think it was sent incorrectly contact one of the administrators:
       http://issues.apache.org/cayenne/secure/Administrators.jspa
    -
    For more information on JIRA, see:
       http://www.atlassian.com/software/jira
    



    This archive was generated by hypermail 2.0.0 : Wed Oct 18 2006 - 03:41:01 EDT