3 Replies Latest reply on Jul 4, 2012 9:08 AM by Miloud Haimoune

    jbpm 5.3.final postgres issue

    Miloud Haimoune Newbie

      Hi all,

       

      I'm  migrating the code of my application to use jbpm latest release (5.3.final). but I'm facing  this exception when I create a new process instance :

       

      13:01:13,688 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: 42804

      13:01:13,688 ERROR [JDBCExceptionReporter] ERROR: column "processinstancebytearray" is of type oid but expression is of type bytea

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

        Position: 149.

       

      I found a post wich advises to use a recent version of hibernate 3.6.final. but I m using jboss 5.1 which provides hibenate 3.1 and I don't think it's very wise hibernate (used by another application).

       

      the some code was working fine with JBPM 5.2.final

       

      if you have any solution ??

       

      many thanks

        • 1. Re: jbpm 5.3.final postgres issue
          hamsterdancer Newbie

          I'm getting the same Error. Did you find any solution yet?

          • 2. Re: jbpm 5.3.final postgres issue
            Miloud Haimoune Newbie

            Unfortunately not yet. I'm trying to migrate to jboss 7, to upgrade hibernate version

            • 3. Re: jbpm 5.3.final postgres issue
              Miloud Haimoune Newbie

              I solved this issue,

               

              in persistence.xml I had : <mapping-file>META-INF/ProcessInstanceInfo.hbm.xml</mapping-file>

               

              and I added the ProcessInstanceInfo.hbm.xml file in the same place as persistence.xml.

               

              what I did'nt know jbpm-persistence-jpa-5.3.0.Final.jar comes with it's oun ProcessInstanceInfo.hbm.xml file,

               

              So by changing the name of the file ProcessInstanceInfo.hbm.xml to (ProcessInstanceInfo_P.hbm.xml) in the folder META-INF of my project

               

              and adding <mapping-file>META-INF/ProcessInstanceInfo_P.hbm.xml</mapping-file> (remove the old one) in my persistence.xml

               

              and  changing in ProcessInstanceInfo_P.hbm.xml file:

               

                <property name="processInstanceByteArray" type="org.jbpm.persistence.processinstance.BlobUserType" 
                          column="processInstanceByteArray" access="field" length="2147483647" />
              

              to

               <property name="processInstanceByteArray" type="org.hibernate.type.PrimitiveByteArrayBlobType" access="field" >
                               <column name="processInstanceByteArray" sql-type="oid"/>
                 </property>
              

               

               

              this fix my issue

               

              HTH