Constraint handling messed up?

From: Holger Hoffstätte (holge..izards.de)
Date: Wed Feb 05 2003 - 14:04:04 EST

  • Next message: Holger Hoffstätte: "Re: Constraint handling messed up?"

    After finishing the deprecation cleanups I sync'ed with other changes and
    now get failures in a couple of tests. Most often they are caused by a
    constraint violation, like e.g. in DOPrefetchTst.testPrefetchToMany on the
    first insert:

        <error message="Raising from underlyingQueryEngine exception."
    type="org.objectstyle.cayenne.CayenneRuntimeException">org.objectstyle.cayenne.CayenneRuntimeException:
    Raising from underlyingQueryEngine exception.
            at
    org.objectstyle.cayenne.access.util.ContextCommitObserver.nextGlobalException(ContextCommitObserver.java:188)
            at
    org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:335)
            at
    org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.java:413)
            at
    org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:842)
            at
    org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:680)
            at
    org.objectstyle.cayenne.DOPrefetchTst.testPrefetchToMany(DOPrefetchTst.java:79)

    log goes like this:
    cayenne INFO [main 02-05 19:27:38] QueryLogger: CREATE SEQUENCE
    pk_delete_rule_test1 START WITH 200 INCREMENT BY 20
    cayenne INFO [main 02-05 19:27:38] QueryLogger: CREATE SEQUENCE
    pk_float_test START WITH 200 INCREMENT BY 20
    cayenne INFO [main 02-05 19:27:38] QueryLogger: --- will run 2 queries.
    cayenne INFO [main 02-05 19:27:38] QueryLogger: INSERT INTO PAINTING
    (PAINTING_ID, ESTIMATED_PRICE, ARTIST_ID, PAINTING_TITLE) VALUES (?, ?, ?,
    ?) [params: 212, NULL, 209, 'painting about nothing']
    cayenne INFO [main 02-05 19:27:38] QueryLogger: *** error.
    java.sql.SQLException: ORA-02291: integrity constraint
    (CAYENNE.SYS_C001945) violated - parent key not found

    This 'parent key not found' seems to happen almost always, and I don't
    understand it since this worked before (before I did most of my checkins).
    I get these failures with both Oracle 8 and 9, but not with MySQL (not
    surprising). I just reviewed _all_ of my checkins today and could not for
    the life of me find where I might have messed up dependency sorting, so
    I'm a little lost here. Reverting the classes that Andriy checked in today
    and yesterday didn't help either. It can't be one of the removed methods
    (obviously) and if I had really messed up something fundamental more tests
    would (should) fail, I think. Another problem is that SF seems to be down
    and I think I'm not getting all commit mails in time, so if there has been
    a repository conflict or somebody knows what might be causing this I'd
    appreciate a pointer so I don't spend hours chasing ghosts. Will try to
    revert further in the meantime.

    Holger



    This archive was generated by hypermail 2.0.0 : Wed Feb 05 2003 - 14:05:46 EST