Discussion:
[jboss-user] [jBPM] - completing human task - NoSuchFieldError: classLoader
wishmaster7
2013-03-13 16:37:57 UTC
Permalink
wishmaster7 [https://community.jboss.org/people/wishmaster7] created the discussion

"completing human task - NoSuchFieldError: classLoader"

To view the discussion, visit: https://community.jboss.org/message/802416#802416

--------------------------------------------------------------
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.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/802416#802416]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Thomas Setiabudi
2013-03-14 04:02:01 UTC
Permalink
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion

"Re: completing human task - NoSuchFieldError: classLoader"

To view the discussion, visit: https://community.jboss.org/message/802537#802537

--------------------------------------------------------------
Hi wishmaster7,

use something like this with JBPM5.4



java.util.Map<String, Object> result = new java.util.HashMap<String, Object>();
                    result.put("Result", action);
 
                    org.jbpm.task.service.ContentData contentData = org.jbpm.task.utils.ContentMarshallerHelper.marshal(result, null);
                    client.complete(taskId, userId, contentData);
 



Regards,
Thomas Setiabudi
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/802537#802537]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
wishmaster7
2013-03-14 07:29:33 UTC
Permalink
wishmaster7 [https://community.jboss.org/people/wishmaster7] created the discussion

"Re: completing human task - NoSuchFieldError: classLoader"

To view the discussion, visit: https://community.jboss.org/message/802560#802560

--------------------------------------------------------------
Hi Thomas,

This is a good idea, and I have already tried it. But if you look at the error stack trace, you see that completeWithResults() calls complete(), which calls the marshaller another time and makes the error. So the same problem happens.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/802560#802560]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
wishmaster7
2013-03-14 08:13:04 UTC
Permalink
wishmaster7 [https://community.jboss.org/people/wishmaster7] created the discussion

"Re: completing human task - NoSuchFieldError: classLoader"

To view the discussion, visit: https://community.jboss.org/message/802563#802563

--------------------------------------------------------------
if someone has the same problem, I found the solution:

I was using:

- jbpm-human-task-core-5.4.0.Final.jar
- drools-core-5.4.0.Final.jar

instead, use:

- jbpm-human-task-core-5.4.0.Final.jar
- drools-core-*5.5.0*.Final.jar
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/802563#802563]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...