<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Alberto, <br>
<br>
Unfortunately, the jbpm-dev list is only for communication
concerning building new parts of jbpm -- not for bugs or other
problems. <br>
<br>
See my mail to you (and jbpm-users) for an answer to this. <br>
<br>
Thanks,<br>
Marco<br>
<br>
29-06-12 11:21, Alberto R. Galdo:<br>
</div>
<blockquote
cite="mid:CADrEBQFrt_mQeucNb=Fi9MZtsgHHPcuD2W8rSNs75-T9AjOuNQ@mail.gmail.com"
type="cite">Hi,<br>
<br>
I'm posting in this list because I will post very low level
details which may not fit well in the user list. Please tell me if
this is correct.<br>
<br>
We are trying to build a system using JBPM with human task, and
we are now using the recent LocalTaskService and
LocalHTWorkItemHandler ... that way:<br>
<br>
humanTaskClient = new LocalTaskService(taskService);<br>
....<br>
<br>
LocalHTWorkItemHandler localHTWorkItemHandler = new
LocalHTWorkItemHandler(humanTaskClient, sesion);<br>
<br>
....<br>
<br>
We are facing a NullpointerException when unmarshalling the
result of a completed human task. Here's the relevant stack trace:<br>
<br>
11:11:21,734 ERROR [stderr] (http--0.0.0.0-8080-1)
java.lang.NullPointerException<br>
11:11:21,734 ERROR [stderr] (http--0.0.0.0-8080-1) at
org.jbpm.marshalling.impl.ProtobufProcessMarshaller.unmarshallVariableValue(ProtobufProcessMarshaller.java:270)<br>
11:11:21,734 ERROR [stderr] (http--0.0.0.0-8080-1) at
org.jbpm.task.utils.ContentMarshallerHelper.unmarshall(ContentMarshallerHelper.java:112)<br>
11:11:21,750 ERROR [stderr] (http--0.0.0.0-8080-1) at
org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler$TaskCompletedHandler.handleCompletedTask(GenericHTWorkItemHandler.java:230)<br>
11:11:21,750 ERROR [stderr] (http--0.0.0.0-8080-1) at
org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler$TaskCompletedHandler.execute(GenericHTWorkItemHandler.java:204)<br>
11:11:21,750 ERROR [stderr] (http--0.0.0.0-8080-1) at
org.jbpm.task.service.local.LocalTaskService$SimpleEventTransport.trigger(LocalTaskService.java:320)<br>
11:11:21,750 ERROR [stderr] (http--0.0.0.0-8080-1) at
org.jbpm.task.event.MessagingTaskEventListener.taskCompleted(MessagingTaskEventListener.java:80)<br>
11:11:21,765 ERROR [stderr] (http--0.0.0.0-8080-1) at
org.jbpm.task.event.TaskEventSupport.fireTaskCompleted(TaskEventSupport.java:46)<br>
11:11:21,765 ERROR [stderr] (http--0.0.0.0-8080-1) at
org.jbpm.task.service.TaskServiceSession.postTaskCompleteOperation(TaskServiceSession.java:563)<br>
11:11:21,765 ERROR [stderr] (http--0.0.0.0-8080-1) at
org.jbpm.task.service.TaskServiceSession.taskOperation(TaskServiceSession.java:495)<br>
11:11:21,765 ERROR [stderr] (http--0.0.0.0-8080-1) at
org.jbpm.task.service.local.LocalTaskService.complete(LocalTaskService.java:82)<br>
<br>
Some inspection lead us to locate this snippet that is <br>
<br>
<br>
ObjectMarshallingStrategyStore
objectMarshallingStrategyStore =
marshallingConfigurationImpl.getObjectMarshallingStrategyStore();<br>
context = new MarshallerReaderContext(stream, null,
null, objectMarshallingStrategyStore, null, env);<br>
if(classloader != null){<br>
context.classLoader = classloader;<br>
}else{<br>
context.classLoader =
ContentMarshallerHelper.class.getClassLoader();<br>
}<br>
ExtensionRegistry registry =
PersisterHelper.buildRegistry( context, null ); <br>
Header _header =
PersisterHelper.readFromStreamWithHeader(context, registry);<br>
Variable parseFrom =
JBPMMessages.Variable.parseFrom(_header.getPayload(), registry);<br>
Object value =
ProtobufProcessMarshaller.unmarshallVariableValue(context,
parseFrom);<br>
<br>
<br>
which is radically different from the previous implementation
( protocol buffers appears ).<br>
<br>
The problem is that in this code ( in
ProtobufProcessMarshaller ) :<br>
<br>
ObjectMarshallingStrategy strategy =
context.usedStrategies.get( _variable.getStrategyIndex() );<br>
Object value = strategy.unmarshal(
context.strategyContexts.get( strategy ),<br>
context,<br>
_variable.getValue().toByteArray(), <br>
(context.ruleBase ==
null)?null:context.ruleBase.getRootClassLoader() );<br>
return value;<br>
<br>
context.usedStrategies and context.strategyContexts are
both Maps of size 0. And so the NPE.<br>
<br>
Our process runs ok before creating the human task and it
only fails when completing a human task.<br>
<br>
Any insight on what can be happening here? <br>
<br>
Greets,<br>
<br>
<br clear="all">
Alberto R. Galdo<br>
<a moz-do-not-send="true" href="mailto:argaldo@gmail.com"
target="_blank">argaldo@gmail.com</a><br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
jbpm-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:jbpm-dev@lists.jboss.org">jbpm-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/jbpm-dev">https://lists.jboss.org/mailman/listinfo/jbpm-dev</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
jBPM/Drools developer
Utrecht, the Netherlands</pre>
</body>
</html>