[jira] Created: (CAY-1045) postRemove lifecycle callback not NPE safe

From: Marcin Skladaniec (JIRA) ("Marcin)
Date: Sat May 03 2008 - 01:34:52 EDT

  • Next message: Andrus Adamchik (JIRA): "[jira] Closed: (CAY-1045) postRemove lifecycle callback not NPE safe"

    postRemove lifecycle callback not NPE safe
    ------------------------------------------

                     Key: CAY-1045
                     URL: https://issues.apache.org/cayenne/browse/CAY-1045
                 Project: Cayenne
              Issue Type: Bug
              Components: Cayenne Core Library
        Affects Versions: 3.0
             Environment: 3.0M3 (svn 642725)
                Reporter: Marcin Skladaniec
                Assignee: Andrus Adamchik

    Standard one to many relationship: User -< Preference, cascade rule from User to Preference. NPE is thrown when using postRemove callback on Preference record and if the getUser() method is invoked.

    Stack trace :
         [java] org.apache.cayenne.CayenneRuntimeException: [v.3.0-SNAPSHOT Mar 30 2008 12:39:13] Remote error. URL - http://10.29.64.41:8181/angel-server-cayenne; CAUSE - java.lang.NullPointerException
         [java] at org.apache.cayenne.access.ToOneFault.doResolveFault(ToOneFault.java:73)
         [java] at org.apache.cayenne.access.ToOneFault.resolveFault(ToOneFault.java:46)
         [java] at org.apache.cayenne.CayenneDataObject.readProperty(CayenneDataObject.java:208)
         [java] at ish.oncourse.server.cayenne.glue._Preference.getUser(_Preference.java:97)
         [java] at ish.oncourse.server.cayenne.Preference.getAllowsReplicationQueueing(Preference.java:28)
         [java] at ish.oncourse.server.soap.willow.SOAPUtils.createQueuedRecord(SOAPUtils.java:1033)
         [java] at ish.oncourse.server.cayenne.glue.CayenneDataObject.addRecordToReplicationQueue(CayenneDataObject.java:340)
         [java] at ish.oncourse.server.cayenne.glue.CayenneDataObject.postRemove(CayenneDataObject.java:318

    I believe that preserving the relationship on record deletion might be a bit hard, but at least the NPE should be avoided.

    -- 
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
    



    This archive was generated by hypermail 2.0.0 : Sat May 03 2008 - 01:38:55 EDT