gigazhang [
https://community.jboss.org/people/gigazhang] created the discussion
"jbpm5.3 task complete NullPointerException
GetCompletedTaskResponseHandler.execute(AsyncGenericHTWorkItemHandler.java:241)"
To view the discussion, visit:
https://community.jboss.org/message/744483#744483
--------------------------------------------------------------
https://community.jboss.org/servlet/JiveServlet/showImage/2-744483-18877/...
https://community.jboss.org/servlet/JiveServlet/downloadImage/2-744483-18...
+ContentData contentData = null;+
+ if (data != null) {+
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();+
+ ObjectOutputStream out = null;+
+ try {+
+ out = new ObjectOutputStream(bos);+
+ out.writeObject(data);+
+ contentData = new ContentData();+
+ System.out.println(bos.toByteArray());+
+ contentData.setContent(bos.toByteArray());+
+ contentData.setAccessType(AccessType.Inline);+
+ out.close();+
+ out = null;+
+ bos.close();+
+ bos = null;+
+ } catch (IOException e) {+
+ e.printStackTrace();+
+ }+
+ }+
+ taskClient.complete(taskId, userId, contentData, operationHandler);+
*when I complete the task,there throws exception:*
2012-06-27 17:34:46,634 INFO [org.apache.mina.filter.logging.LoggingFilter] - <SENT:
HeapBuffer[pos=0 lim=0 cap=0: empty]>
java.lang.NullPointerException
at
org.jbpm.process.workitem.wsht.AsyncGenericHTWorkItemHandler$GetCompletedTaskResponseHandler.execute(AsyncGenericHTWorkItemHandler.java:241)
at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:81)
at
org.jbpm.task.service.mina.MinaTaskClientHandler.messageReceived(MinaTaskClientHandler.java:47)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:716)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)
at
org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:427)
at
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:245)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)
at
org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:692)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:645)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:634)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:66)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1078)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/744483#744483]
Start a new discussion in jBPM Development at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]