2 Replies Latest reply on Sep 6, 2012 8:38 AM by Elton Plath

    Failing to get task content on jBPM 5.4.0-SNAPSHOT

    Elton Plath Newbie

      Hi all,

       

       

      I upgraded to the latest snapshot but I am now getting an OptionalDataException reading in the content stream (this was working on 5.3.0-Final):

       

       

      java.io.OptionalDataException

                at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1339)

                at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)

       

      The way I am getting the content is as follows:

       

       

      task = getTask(task.getId());  

      BlockingGetContentResponseHandler responseHandler = new BlockingGetContentResponseHandler();

      client.getContent(task.getTaskData().getDocumentContentId(), responseHandler);

      Content content = responseHandler.getContent();

      byte[] byteContent = content.getContent();

      ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteContent);

      ObjectInputStream ois = new ObjectInputStream(byteArrayInputStream);

      while ((obj = ois.readObject()) != null) {

       

      I am setting up my task client as follows:

       

       

      clientConnector = new HornetQTaskClientConnector("HornetQ_BpmTaskClient_" + Thread.currentThread().getName(),

                                                                                                                                        new HornetQTaskClientHandler(SystemEventListenerFactory.getSystemEventListener()));

      client = new TaskClient(clientConnector);

       

       

      Please can you help

       

       

      Regards

      Elton