3 Replies Latest reply on Mar 14, 2013 4:13 AM by wishmaster7

    completing human task - NoSuchFieldError: classLoader

    wishmaster7

      Hi all,

       

      I have found something very strange when I complete a Human Task. Here is what I do:

       

      Map<String, Object> result = new HashMap<String, Object>();

      result.put("Result", action);

      taskService.completeWithResults(taskId, userId, result);

       

      and I have the following error:

       

      java.lang.NoSuchFieldError: classLoader

          at org.jbpm.task.utils.ContentMarshallerHelper.unmarshall(ContentMarshallerHelper.java:107)

          at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler$TaskCompletedHandler.handleCompletedTask(GenericHTWorkItemHandler.java:260)

          at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler$TaskCompletedHandler.execute(GenericHTWorkItemHandler.java:234)

          at org.jbpm.task.service.local.LocalTaskService$SimpleEventTransport.trigger(LocalTaskService.java:329)

          at org.jbpm.task.event.MessagingTaskEventListener.triggerPayload(MessagingTaskEventListener.java:76)

          at org.jbpm.task.event.MessagingTaskEventListener.handleEvent(MessagingTaskEventListener.java:92)

          at org.jbpm.task.event.MessagingTaskEventListener.taskCompleted(MessagingTaskEventListener.java:109)

          at org.jbpm.task.event.TaskEventSupport.fireTaskCompleted(TaskEventSupport.java:49)

          at org.jbpm.task.service.TaskServiceSession.postTaskCompleteOperation(TaskServiceSession.java:569)

          at org.jbpm.task.service.TaskServiceSession.taskOperation(TaskServiceSession.java:495)

          at org.jbpm.task.service.local.LocalTaskService.complete(LocalTaskService.java:83)

          at org.jbpm.task.service.local.LocalTaskService.completeWithResults(LocalTaskService.java:91)

       

       

      So, I search in the code, and I find :

       

      MarshallerReaderContext context = null;

      context.classLoader = ContentMarshallerHelper.class.getClassLoader();

       

      BUT... (something I can't explain), MarshallerReaderContext has no classLoader. This throws the error above.

       

      Someone knows? Any help would be apreciated.