3 Replies Latest reply on Apr 23, 2014 9:22 AM by Marco Rietveld

    workItemByteArray null-pointer exception on getWorkItem

    Evan James Knowles Newbie

      Hey,

       

      We're having issues in jBPM6 where, occasionally, the workItemByteArray is null in workItemInfo when getWorkItem is called. This results in a null being handed to the ByteArrayInputStream and the subsequent null-pointer exception.

       

      The column is correctly persisted in the database, but it looks like Hibernate is doing lazy loading on it. If I call getWorkItemByteArray on the object, the byte array is retrieved and returned, but in getWorkItem the reference to the object is used directly and the lazy loading is not run.

       

      I believe this could be corrected by changing the fetch type on workItemByteArray to EAGER instead - can anyone think of any issues or other workarounds I could do?

       

      Thanks,

      Evan