0 Replies Latest reply on Jan 8, 2015 2:06 AM by Vijai Kumar

    Getting task content in JBPM 6.1 from Java Remote API

    Vijai Kumar Newbie

      Dear All,

       

      I am using following code to get the task content in JBPM 6.1 from Java Remote API and it showing the following error.

       

       RemoteRestRuntimeFactory restSessionFactory = new RemoteRestRuntimeFactory(deploymentId, instanceUrl, user, password, timeoutInSeconds); 
              RemoteRuntimeEngine engine = restSessionFactory.newRuntimeEngine();
              KieSession ksession = engine.getKieSession();
              TaskService taskService = engine.getTaskService();
              List<TaskSummary> tasks = taskService.getTasksAssignedAsPotentialOwner("inventum0001", "en-UK");
      
              Task userTask = taskService.getTaskById(6);
              TaskData taskData = userTask.getTaskData();
              Content content = taskService.getContentById(taskData.getDocumentContentId());
              Map<String, Object> mapData = (Map<String, Object>) ContentMarshallerHelper.unmarshall(content.getContent(), null);
              System.out.println("mapData: " + mapData);
              for (Map.Entry<String, Object> entry : mapData.entrySet()) {
                  System.out.println(entry.getKey() + " = " + entry.getValue());
              }
      

       

       

      Exception in thread "main" java.lang.VerifyError: class org.drools.core.marshalling.impl.ProtobufMessages$Header overrides final method getUnknownFields.()Lcom/google/protobuf/UnknownFieldSet;
          at java.lang.ClassLoader.defineClass1(Native Method)
          at java.lang.ClassLoader.defineClass(Unknown Source)
          at java.security.SecureClassLoader.defineClass(Unknown Source)
          at java.net.URLClassLoader.defineClass(Unknown Source)
          at java.net.URLClassLoader.access$100(Unknown Source)
          at java.net.URLClassLoader$1.run(Unknown Source)
          at java.net.URLClassLoader$1.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at org.drools.core.marshalling.impl.PersisterHelper.readFromStreamWithHeaderPreloaded(PersisterHelper.java:258)
          at org.jbpm.services.task.utils.ContentMarshallerHelper.unmarshall(ContentMarshallerHelper.java:102)
          at org.jbpm.services.task.utils.ContentMarshallerHelper.unmarshall(ContentMarshallerHelper.java:81)
          at jbpm6.auth.TaskContent.main(TaskContent.java:63)
      

       

      Could you please help me how to resolve this issue?

       

      Regards,

      Vijai