Null Pointer When Setting a Reverse Relationship in 1.0.6

From: Bret Gregory (bret.gregor..ccesspointinc.com)
Date: Mon Mar 29 2004 - 11:37:49 EST

  • Next message: Lucio nuņez: "Problem with Rdb$Fields"

    java.lang.NullPointerException
            at
    org.objectstyle.cayenne.access.util.BatchQueryUtils.buildSnapshotForInsert(B
    atchQueryUtil
    s.java:234)
            at
    org.objectstyle.cayenne.access.ContextCommit.prepareInsertQueries(ContextCom
    mit.java:327)

            at
    org.objectstyle.cayenne.access.ContextCommit.commit(ContextCommit.java:150)
            at
    org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:79
    4)
            at
    org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:76
    8)
            at ioa.command.CommandOqueue.executeOqueue(CommandOqueue.java:67)
            at ioa.command.CommandOqueue.<init>(CommandOqueue.java:17)
            at
    ioa.utility.CommandProcessor.executeCommand(CommandProcessor.java:440)
            at ioa.utility.CommandProcessor.process(CommandProcessor.java:263)
            at ioa.player.Player.run(Player.java:97)
            at java.lang.Thread.run(Thread.java:534)

    I am getting this null pointer when I attempt to fetched object to an object
    that was newly created.

    I get a different NullPointer if I try to set the relationship from the
    other direction.

    java.lang.NullPointerException
            at
    org.objectstyle.cayenne.CayenneDataObject.setReverseRelationship(CayenneData
    Object.java:3
    80)
            at
    org.objectstyle.cayenne.CayenneDataObject.setToOneTarget(CayenneDataObject.j
    ava:359)
            at ioa.auto._Player.setOqueue(_Player.java:44)
            at ioa.command.CommandOqueue.executeOqueue(CommandOqueue.java:45)
            at ioa.command.CommandOqueue.<init>(CommandOqueue.java:17)
            at
    ioa.utility.CommandProcessor.executeCommand(CommandProcessor.java:440)
            at ioa.utility.CommandProcessor.process(CommandProcessor.java:263)
            at ioa.player.Player.run(Player.java:97)
            at java.lang.Thread.run(Thread.java:534)

    This is the exception I am getting when I try to relation and new object to
    the fetched object. I am not sure if I am doing something wrong, but it is
    Monday so I wouldn't be surprised. This seems like it would be pretty
    common, and Ideas?



    This archive was generated by hypermail 2.0.0 : Mon Mar 29 2004 - 11:39:05 EST