Both stack traces point to the lines with chained invocation of
methods, so it is hard to tell which one has failed (I guess I may
refactor the code to put them all on separate lines, but not now).
Anyway, this is definitely not an issue that ever came up before, so
lets try to guess what it might be. First, do you have any Modeler
warnings when you save your mapping?
Andrus
On Mar 29, 2004, at 11:37 AM, Bret Gregory wrote:
> java.lang.NullPointerException
> at
> org.objectstyle.cayenne.access.util.BatchQueryUtils.buildSnapshotForIns
> ert(B
> atchQueryUtil
> s.java:234)
> at
> org.objectstyle.cayenne.access.ContextCommit.prepareInsertQueries(Conte
> xtCom
> mit.java:327)
>
> at
> org.objectstyle.cayenne.access.ContextCommit.commit(ContextCommit.java:
> 150)
> at
> org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.ja
> va:79
> 4)
> at
> org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.ja
> va: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(Cayenn
> eData
> Object.java:3
> 80)
> at
> org.objectstyle.cayenne.CayenneDataObject.setToOneTarget(CayenneDataObj
> ect.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 - 14:13:26 EST