3 Replies Latest reply on Apr 20, 2011 1:00 AM by Krešimir Popović

    Drools 5.x + jBPM 5.x + Hibernate 3.6.x + Postgres 9.x - bug

    Krešimir Popović Newbie



      does anyone know if jBPM was tested with Hibernate 3.6.x (part of JBoss 6.x) ?



      I just want to know if JBPM 5.x tested with hibernate 3.6.x/Postgres 9.x ? Hibernate team has done some changes since hibernate 3.5.x regarding bytea / oid data type handling.






      This is the error I get when I execute Mina task client method: getTasksAssignedAsPotentialOwner


      15:16:19,690 INFO  [hr.bpmsolutions.printinghouse.services.actions.humantask.HumanTaskAction] tmp:0

      15:16:19,690 INFO  [hr.bpmsolutions.printinghouse.services.actions.humantask.HumanTaskAction] tasksAssignedAsPotentialOw

      ner - END

      15:16:19,694 INFO  [STDOUT] Hibernate:

      15:16:19,695 INFO  [STDOUT]     insert

      15:16:19,695 INFO  [STDOUT]     into

      15:16:19,695 INFO  [STDOUT]         SessionInfo

      15:16:19,695 INFO  [STDOUT]         (lastModificationDate, rulesByteArray, startDate, OPTLOCK, id)

      15:16:19,696 INFO  [STDOUT]     values

      15:16:19,696 INFO  [STDOUT]         (?, ?, ?, ?, ?)

      15:16:19,708 WARN  [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 42804

      15:16:19,709 ERROR [org.hibernate.util.JDBCExceptionReporter] ERROR: column "rulesbytearray" is of type oid but expressi

      on is of type bytea

        Hint: You will need to rewrite or cast the expression.

        Position: 100

      15:16:19,711 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with ses

      sion: org.hibernate.exception.SQLGrammarException: could not insert: [org.drools.persistence.info.SessionInfo]

              at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92) [:3.6.0.Final]


      I get also the same thing for processinstanceinfo -->  COLUMN processinstancebytearray


      Problematic Entity classes:





      Maybe what is needed to do is to make correction in Drools product. processinstancebytearray and rulesbytearray fields should be marked with annotation @Type(type="org.hibernate.type.PrimitiveByteArrayBlobType")?



      Best Regards,