1 Reply Latest reply on Mar 23, 2007 1:16 PM by dslevine

    JBPM3.1 Beta2: comparing hibernate proxies against the real

    tobias.bosch

      Hello.
      I actually use JBPM3.1 Beta2, and in some cases I get an error like this if I delete a ProcessInstance:
      java.sql.BatchUpdateException: ORA-02292: integrity
      constraint (FK_VARINST_TKVARMP) violated - child record found

      The reason was that there were two entries with the same map-keys in the database-table to which the field taskInstances (type map) in TokenVariableMap was mapped. I debugged the whole thing and found that sometimes Hibernate uses Proxies and sometimes it does not. However, if it does not, the object does not equals to the proxy. I know that in e.g. TaskInstance there is an extra equals()-method to do this.
      However, this method is still missing in VariableInstance.

      The same thing is true for ProcessLog. I get the error:
      ORA-02292: integrity constraint (FK_LOG_TASKINST) violated - child record found

      So, could you please insert these equals()-method into VariableInstance and ProcessLog? I made it by myself to test it, and it worked.

      Tobias

        • 1. Re: JBPM3.1 Beta2: comparing hibernate proxies against the r

          Using jBPM with Spring and Hibernate, I am sometimes getting:

          java.sql.BatchUpdateException: ORA-02291: integrity constraint (JBPMUSER.FK_LOG_TASKINST) violated - parent key not found

          When signalling/ending a task. Only sometimes though, and seemingly randomly.

          I'm using Hibernate 3.1 still.

          I havent traced through yet, but if others have experienced similar issues please share your war stories.