5 Replies Latest reply on Jun 24, 2009 12:48 AM by cash1981

    StringInstance in JBPM is too long

    cash1981

      We have a String variable which we are outjecting to the BusinessProcess context, however when we input a value that is too long we get this exception:


      23 Jun 09 14:36:20, WARN   org.hibernate.util.JDBCExceptionReporter:logExceptions:77 SQL Error: 0, SQLState: 01004 
      23 Jun 09 14:36:20, ERROR  org.hibernate.util.JDBCExceptionReporter:logExceptions:78 Data truncation: Data too long for column 'STRINGVALUE_' at row 1 
      23 Jun 09 14:36:20, ERROR  org.jbpm.db.TaskMgmtSession:findPooledTaskInstances:123 org.hibernate.exception.GenericJDBCException: could not insert: [org.jbpm.context.exe.variableinstance.StringInstance] 
      23 Jun 09 14:36:36, ERROR  some.package.action.ApprovalHandler:approveAndMark:91 An unexpected error occured with the messages couldn't get pooled task instances list for actors '[officer,officer]', will reset the approval 
      23 Jun 09 14:36:38, ERROR  org.hibernate.AssertionFailure:<init>:22 an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session) 
      org.hibernate.AssertionFailure: null id in org.jbpm.context.exe.variableinstance.StringInstance entry (don't flush the Session after an exception occurs)



      Is there anyway to increase the size of the variable so that it accepts longer values? Or is there something else going on in the background that I am not aware of.

        • 1. Re: StringInstance in JBPM is too long
          cash1981

          I think it might be this table that is the problem:




          desc JBPM_VARIABLEINSTANCE;
          +-------------------+--------------+------+-----+---------+----------------+
          | Field             | Type         | Null | Key | Default | Extra          |
          +-------------------+--------------+------+-----+---------+----------------+
          | ID_               | bigint(20)   | NO   | PRI | NULL    | auto_increment | 
          | CLASS_            | char(1)      | NO   |     | NULL    |                | 
          | VERSION_          | int(11)      | NO   |     | NULL    |                | 
          | NAME_             | varchar(255) | YES  |     | NULL    |                | 
          | CONVERTER_        | char(1)      | YES  |     | NULL    |                | 
          | TOKEN_            | bigint(20)   | YES  | MUL | NULL    |                | 
          | TOKENVARIABLEMAP_ | bigint(20)   | YES  | MUL | NULL    |                | 
          | PROCESSINSTANCE_  | bigint(20)   | YES  | MUL | NULL    |                | 
          | BYTEARRAYVALUE_   | bigint(20)   | YES  | MUL | NULL    |                | 
          | DATEVALUE_        | datetime     | YES  |     | NULL    |                | 
          | DOUBLEVALUE_      | double       | YES  |     | NULL    |                | 
          | LONGIDCLASS_      | varchar(255) | YES  |     | NULL    |                | 
          | LONGVALUE_        | bigint(20)   | YES  |     | NULL    |                | 
          | STRINGIDCLASS_    | varchar(255) | YES  |     | NULL    |                | 
          | STRINGVALUE_      | varchar(255) | YES  |     | NULL    |                | 
          | TASKINSTANCE_     | bigint(20)   | YES  | MUL | NULL    |                | 
          +-------------------+--------------+------+-----+---------+----------------+
          




          STRINGVALUE_ varchar(255)


          seems to be the problem here. Can I somehow say that I want this value to be default text or bigger string value?



          • 2. Re: StringInstance in JBPM is too long
            mwohlf

            this should be fixed in jBPM 3.2.6 GA


            see:



            jbpm-2017
            jbpm-2018




            depending on your setup you might want to patch StringInstance.hbm.xml or the setup script

            • 3. Re: StringInstance in JBPM is too long
              cash1981

              Hmm, I think I am running 3.2.2 version of jbpm. I will try 3.2.6. Thanks

              • 4. Re: StringInstance in JBPM is too long
                cash1981

                I am running Seam 2.2. Can I somehow use the newer jbpm version than the one bundled in seam? Or Should I just replace jbpm-jpdl.jar? Seems like thats the only one I can truly change.

                • 5. Re: StringInstance in JBPM is too long
                  cash1981

                  I updated to the 3.2.6.SP1 jbpm-jpdl.jar and that worked fine. Thanks.