2 Replies Latest reply on Jun 11, 2009 9:36 AM by Paul Robinson

    Enable message size Greater than 4KB

    Paul Robinson Master


      I'm using jBPM 3.2.5.SP5 within SOA-P 4.3.0CP01 with a "BpmProcessor" action. I pass the BODY_CONTENT of my esb message to the jBPM process. My ESB message is 5KB.

      When i try to pass a message to the jBPM process action, I get an error stating that:

      ERROR [org.hibernate.util.JDBCExceptionReporter] ERROR: value too long for type character varying(4000)

      So I'm guessing that due to the DB schema I can only have messages up-to 4KB in size. I retried with a 3.9KB message and the problem did not appear.

      I have noticed that I can run the same scenario, with 5KB messages, in "SOA-P 4.3.0CP01.CR2" which uses jBPM 3.2.5.SP1 without seeing the error. So, I assumed that the DB schema has changed between these jBPM versions. I did some searching on this forum and Jira and I can see that there has been quite a few changes to field sizes, in the DB schema, recently. I also notice that people have been having a number of problems that has caused some field sizes to be changed back in subsequent jBPM versions.

      Can anyone tell me if there is an elegant way of allowing 5KB messages, without hacking the DB schema directly?

      Thanks a lot,


        • 1. Re: Enable message size Greater than 4KB
          Alejandro Guizar Master

          It is a long story, feel free to skip to the next paragraph. A customer reported JBPM-701 because they had a problem similar to yours, only with Job exceptions. We were about to release a new minor version of jBPM (3.3) which was a good opportunity to change the type of VARCHAR(4000) columns to TEXT. In the end the 3.3 branch was canceled and we ported the changes to the 3.2 branch. Some releases were made with the new schema (3.2.4, 3.2.5, 3.2.5 SP1) until it became a barrier for customers to upgrade, despite assurances that JDBC drivers handled the change from VARCHAR to TEXT transparently. The jBPM 3.2.2 schema was restored under JBPM-2056 and delivered in 3.2.5.SP2.

          There is no way to insert strings larger than 4000 characters unless you change the related column to TEXT or increase the length. Provide your own copy of the hibernate configuration and specify an alternate mapping document containing the column type change. That was the resolution to JBPM-2057.

          At some point I introduced a typedef which could easily be switched from VARCHAR to TEXT. That got lost among the compatibility restoration storm. With that, you'd only need to override the mapping resource containing the typedef.

          • 2. Re: Enable message size Greater than 4KB
            Paul Robinson Master

            Thanks for the reply,

            I'll give that a go. I don't mind editing the schema if that's the only way to do it currently.