[jboss-user] [jBPM] - Re: java.lang.String cannot be cast to org.jbpm.task.utils.MarshalledContentWrapper
Ouadi BEL
do-not-reply at jboss.com
Thu Mar 28 07:59:31 EDT 2013
Ouadi BEL [https://community.jboss.org/people/ouadi_dev] created the discussion
"Re: java.lang.String cannot be cast to org.jbpm.task.utils.MarshalledContentWrapper"
To view the discussion, visit: https://community.jboss.org/message/805270#805270
--------------------------------------------------------------
Hi,
I have the same with completeWithResults() method
When I want to complete a human task, this exception is triggered, and I'm not able to solve this situation :
17:17:46,192 ERROR [org.jbpm.process.workitem.wsht.CommandBasedWSHumanTaskHandler] (NioProcessor-6) null: java.io.OptionalDataException
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1358) [rt.jar:1.7.0_15]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369) [rt.jar:1.7.0_15]
at org.jbpm.process.workitem.wsht.CommandBasedWSHumanTaskHandler$GetResultContentResponseHandler.execute(CommandBasedWSHumanTaskHandler.java:330) [jbpm-human-task-mina-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:153) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.task.service.mina.MinaTaskClientHandler.messageReceived(MinaTaskClientHandler.java:47) [jbpm-human-task-mina-5.4.0.Final.jar:5.4.0.Final]
at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:716) [mina-core-2.0.1.jar:]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) [mina-core-2.0.1.jar:]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46) [mina-core-2.0.1.jar:]
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796) [mina-core-2.0.1.jar:]
at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:427) [mina-core-2.0.1.jar:]
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:245) [mina-core-2.0.1.jar:]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) [mina-core-2.0.1.jar:]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46) [mina-core-2.0.1.jar:]
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796) [mina-core-2.0.1.jar:]
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119) [mina-core-2.0.1.jar:]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) [mina-core-2.0.1.jar:]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426) [mina-core-2.0.1.jar:]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:692) [mina-core-2.0.1.jar:]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:645) [mina-core-2.0.1.jar:]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:634) [mina-core-2.0.1.jar:]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:66) [mina-core-2.0.1.jar:]
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1078) [mina-core-2.0.1.jar:]
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64) [mina-core-2.0.1.jar:]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_15]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_15]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_15]
Here is my compete taskmethod code :
TaskClient client = null;
try {
client = connectToTaskServer(TASK_SERVER_HOST_IP_ADD,
TASK_SERVER_PORT);
BlockingTaskOperationResponseHandler responseHandler = new BlockingTaskOperationResponseHandler();
Map<String, Object> taskVariables = new HashMap<String, Object>();
// Currency validation accepted
taskVariables.put("o_validationResult", true);
client.completeWithResults(aTaskId, aOwnerId, taskVariables, responseHandler);
responseHandler.waitTillDone(2000);
client.disconnect();
} catch (Exception e) {
try {
client.disconnect();
} catch (Exception e1) {
e1.printStackTrace();
}
e.printStackTrace();
logger.error("Unable to completing the Task '" + aTaskId
+ "' assigned to user '" + aOwnerId + "' : " + e.toString());
throw new TaskManagerException("Unable to completing the Task '"
+ aTaskId + "' assigned to user '" + aOwnerId + "' : "
+ e.toString(), e);
}
After hard searching in the net, I'm not able to detect where this exception triggered !
Here is exception javadoc :
http://docs.oracle.com/javase/6/docs/api/java/io/OptionalDataException.html http://docs.oracle.com/javase/6/docs/api/java/io/OptionalDataException.html
Thanks for helps.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/805270#805270]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130328/eea3879e/attachment.html
More information about the jboss-user
mailing list