We ran into a weird exception in some code that's been working fine and
untouched for a couple of months. The stack trace said there was a
NullPointerException at
org.objectstyle.cayenne.access.util.BatchQueryUtils.updatesLOBColumns(BatchQ
ueryUtils.java:112). This was with the standard cayenne 1.1 jar.
That didn't seem likely since the null object would have to be coming from
an iterator.next() statement. But sure enough, I added some logging
statements into the cayenne code, rebuilt the jar and got this just before
the iterator loop:
updatedAttributes = [null,
org.objectstyle.cayenne.map.DbAttribut..44a47[TIMEWHEN]]
While trying to distill a good test case, I rebuilt our model.jar clean.
That is, regenerated our superclass files and rebuilt all our DataObject
classes. The problem went away.
Oh well... it looks like a user error... somehow we created an internally
inconsistent model. I'm mentioning it on the off chance that it'll ring a
bell for someone, and some checks can be added to catch an internally
inconsistent model earlier. (Starting with a not-null assertion in
BatchQueryUtils, for instance.)
Or maybe it's an indicator that our build process isn't thorough enough.
When we change anything in the DataMap, all the superclass files get
regenerated and rebuilt (using the standard cgen task) but the terminal
classes don't.
This archive was generated by hypermail 2.0.0 : Tue Feb 08 2005 - 09:49:52 EST