AnsweredAssumed Answered

StackoverflowError while deserializing process variable

Question asked by swamy2156 on Dec 23, 2015
Latest reply on Dec 30, 2015 by trademak
This issue coming now in our production systems. As per business need, we serialize xml documents as process variable. For small document, everything fine. But for document having 20K lines of content creating problem while deserializing the process variable(e.g., delegateTask.getVariables() ).
I am surprised there is no problem while serializing it in production server.(But, I am facing serialize problem when I initiate workflow from eclipse while storing it in Variable table). While debug I came to know that SerializableType.deserialize() -> Object deserializedObject = ois.readObject(); causing StackOverflowError.
Because of this, we are not able to do any operations on that task in production. Is there any alternate/fix to get rid of StackOverflowException while se/deserializing large process variables??

/* SerializableType.deserialize() method */
  public Object deserialize(byte[] bytes, ValueFields valueFields) {
    ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
    try {
      ObjectInputStream ois = createObjectInputStream(bais);
      Object deserializedObject = ois.readObject();   //***throwing StaskOverflowError***

      return deserializedObject;
    } catch (Exception e) {
      throw new ActivitiException("Couldn't deserialize object in variable '"+valueFields.getName()+"'", e);
    } finally {

** attached my realtime xml document for which I am facing this issue along with this ticket.