0 Replies Latest reply on May 14, 2015 2:17 PM by mariaprabudass Edwin

    UTFDataFormat Exception in ReadProcessInstance

    mariaprabudass Edwin Newbie

      Hi,

       

      I came across to an issue when i upgrade my drools and jbpm version to the below given specification, while i try to push the Task from one process to another process "UTFDataFormat" Exception found in the readProcessInstance. I am quite confused to use the same. Could you please check and advise me.

       

      Specifications:-

      jBPM: 5.4.0-Final

      drools: 5.5.0-Final

       

      Code:-  

                  WorkflowProcess workFlowProcess = getWorkflowProcess(kbase);

                  BpmnRoute baseRoute = constructBpmnRoute(workFlowProcess);

                  ProcessInstanceInfo processInstanceInfo = processInstanceInfos.get(0);

                  InputStream file = new ByteArrayInputStream( processInstanceInfo.getProcessInstanceByteArray() );

                  InputStream buffer = new BufferedInputStream( file );

                  InternalRuleBase ruleBase = (InternalRuleBase) ((KnowledgeBaseImpl) kbase).ruleBase;

                  InternalWorkingMemory wm = (InternalWorkingMemory) ruleBase.newStatefulSession();

                  RuleFlowProcessInstanceMarshaller processMarshaller;

                  MarshallerReaderContext context = new MarshallerReaderContext(buffer, ruleBase, null, null, ProtobufMarshaller.TIMER_READERS, new EnvironmentImpl());

                  context.wm = wm;

                  processMarshaller = RuleFlowProcessInstanceMarshaller.INSTANCE;

                  ObjectInputStream stream = context.stream;

                  stream.readUTF();

                 WorkflowProcessInstanceImpl processInstance = (WorkflowProcessInstanceImpl) processMarshaller.readProcessInstance(context);

                  context.close();

       

      Exception:-

      java.io.UTFDataFormatException

      17:12:21,747 ERROR [stderr] (http--10.0.5.53-8080-2) at java.io.ObjectInputStream$BlockDataInputStream.readUTFSpan(ObjectInputStream.java:3107)

      17:12:21,747 ERROR [stderr] (http--10.0.5.53-8080-2) at java.io.ObjectInputStream$BlockDataInputStream.readUTFBody(ObjectInputStream.java:3051)

      17:12:21,747 ERROR [stderr] (http--10.0.5.53-8080-2) at java.io.ObjectInputStream$BlockDataInputStream.readUTF(ObjectInputStream.java:2864)

      17:12:21,748 ERROR [stderr] (http--10.0.5.53-8080-2) at java.io.ObjectInputStream.readUTF(ObjectInputStream.java:1072)

      17:12:21,748 ERROR [stderr] (http--10.0.5.53-8080-2) at org.jbpm.marshalling.impl.AbstractProcessInstanceMarshaller.readProcessInstance(AbstractProcessInstanceMarshaller.java:378)

       

      Thanks & Regards,

      Maria Prabudass