Optimistic Locking Bug?

From: Michael Gentry (Yes, I'm a Contractor) ("Michael)
Date: Tue May 10 2005 - 15:09:54 EDT

  • Next message: Mike Kienenberger: "Re: Optimistic Locking Bug?"

    Iım getting an optimistic locking failure when trying to update a record.
    Here is a portion of the log with the problem highlighted (and reformatted
    to be easier to read, hopefully):

    14:26:55,115 INFO QueryLogger:315 -
        UPDATE LoanCommitment
            SET identifier = ?,
                commitmentOpenState = ?
            WHERE identifier = ? AND
                comments IS NULL AND
                commitmentOpenState = ? AND
                commitmentPeriod = ?
                AND createDate = ? ...

    14:26:55,196 INFO QueryLogger:337 -
        [bind: < 00 00 00 00 00 00 00 22 59 2D F7 52 >,
        [CREATED [DB=1]],
        < 00 00 00 00 00 00 00 22 59 2D F7 52 >,
        NULL,
        [SUBMITTED [DB=2]],
        30, ...

    It seems to me that if it is going to produce ³comments IS NULL² as part of
    the prepared statement, it shouldnıt try to do a bind parameter, too. It is
    trying to bind the NULL to the commitmentOpenState, when the original value
    was a 2, so it is failing with a locking exception.

    Any thoughts?

    Thanks!

    /dev/mrg



    This archive was generated by hypermail 2.0.0 : Tue May 10 2005 - 15:10:00 EDT