我正在使用以下代码触发从camel到jbpm的进程。
from("timer://foo?fixedRate=true&period=500&repeatCount=1").routeId("mainRoute")
.to("log:Hello?showAll=true&multiline=true")
.process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
`enter code here`for (Object obj : exchange.getIn().getHeaders().entrySet()) {
Map.Entry<String, Object> entry = (Map.Entry<String, Object>) obj;
System.out.println(entry.getKey() + "/" + entry.getValue());
}
final Map map = new HashMap();
map.putAll(exchange.getIn().getHeaders());
map.put("pv_candidate_name", "Hello");
exchange.getOut().setHeader("CamelJBPMParameters", map);
}
})
.setHeader(JBPMConstants.PROCESS_ID, constant("npproj.emp_recruitment3"))
.to("jbpm:http://127.0.0.1:8080/kie-wb64?userName=admin&password=xxx&deploymentId=com.nobleprog:npproj:1.0")
.convertBodyTo(String.class)
.to("log:Hello?showAll=true&multiline=true");
我登录到bpm系统并尝试执行任务,在jbpm中收到以下错误。
13:07:35,498 ERROR [org.guvnor.common.services.backend.exceptions.ExceptionUtilities] (default task-7) Exception thrown: IOException while loading process instance: Error deserializing process instance.: java.lang.IllegalArgumentException: IOException while loading process instance: Error deserializing process instance.
at org.jbpm.persistence.processinstance.ProcessInstanceInfo.getProcessInstance(ProcessInstanceInfo.java:193) [jbpm-persistence-jpa-6.4.0.Final.jar:6.4.0.Final]
at org.jbpm.persistence.processinstance.ProcessInstanceInfo.getProcessInstance(ProcessInstanceInfo.java:166) [jbpm-persistence-jpa-6.4.0.Final.jar:6.4.0.Final]
at org.jbpm.persistence.processinstance.JPAProcessInstanceManager.getProcessInstance(JPAProcessInstanceManager.java:139) [jbpm-persistence-jpa-6.4.0.Final.jar:6.4.0.Final]
at org.jbpm.process.instance.ProcessRuntimeImpl.getProcessInstance(ProcessRuntimeImpl.java:286) [jbpm-flow-6.4.0.Final.jar:6.4.0.Final]
at org.jbpm.process.instance.ProcessRuntimeImpl.getProcessInstance(ProcessRuntimeImpl.java:282) [jbpm-flow-6.4.0.Final.jar:6.4.0.Final]
at org.jbpm.process.instance.ProcessRuntimeImpl.abortProcessInstance(ProcessRuntimeImpl.java:492) [jbpm-flow-6.4.0.Final.jar:6.4.0.Final]
at org.drools.core.impl.StatefulKnowledgeSessionImpl.abortProcessInstance(StatefulKnowledgeSessionImpl.java:538) [drools-core-6.4.0.Final.jar:6.4.0.Final]
at org.drools.core.command.runtime.process.AbortProcessInstanceCommand.execute(AbortProcessInstanceCommand.java:55) [drools-core-6.4.0.Final.jar:6.4.0.Final]
at org.drools.core.command.runtime.process.AbortProcessInstanceCommand.execute(AbortProcessInstanceCommand.java:30) [drools-core-6.4.0.Final.jar:6.4.0.Final]
at org.drools.core.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36) [drools-core-6.4.0.Final.jar:6.4.0.Final]
at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.4.0.Final.jar:6.4.0.Final]
at org.drools.persistence.SingleSessionCommandService$TransactionInterceptor.execute(SingleSessionCommandService.java:592) [drools-persistence-jpa-6.4.0.Final.jar:6.4.0.Final]
at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.4.0.Final.jar:6.4.0.Final]
at org.drools.persistence.jpa.OptimisticLockRetryInterceptor.execute(OptimisticLockRetryInterceptor.java:82) [drools-persistence-jpa-6.4.0.Final.jar:6.4.0.Final]
at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.4.0.Final.jar:6.4.0.Final]
at org.drools.persistence.jta.TransactionLockInterceptor.execute(TransactionLockInterceptor.java:73) [drools-persistence-jpa-6.4.0.Final.jar:6.4.0.Final]
Caused by: java.io.IOException: Error deserializing process instance.
at org.jbpm.marshalling.impl.AbstractProtobufProcessInstanceMarshaller.readProcessInstance(AbstractProtobufProcessInstanceMarshaller.java:477) [jbpm-flow-6.4.0.Final.jar:6.4.0.Final]
at org.jbpm.persistence.processinstance.ProcessInstanceInfo.getProcessInstance(ProcessInstanceInfo.java:185) [jbpm-persistence-jpa-6.4.0.Final.jar:6.4.0.Final]
... 74 more
Caused by: java.lang.ClassNotFoundException: com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl
at org.drools.core.common.ProjectClassLoader.tryDefineType(ProjectClassLoader.java:187) [drools-core-6.4.0.Final.jar:6.4.0.Final]
at org.drools.core.common.ProjectClassLoader.loadType(ProjectClassLoader.java:177) [drools-core-6.4.0.Final.jar:6.4.0.Final]
at org.drools.core.common.ProjectClassLoader.loadClass(ProjectClassLoader.java:143) [drools-core-6.4.0.Final.jar:6.4.0.Final]
at java.lang.ClassLoader.loadClass(ClassLoader.java:358) [rt.jar:1.7.0_79]
at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_79]
at java.lang.Class.forName(Class.java:274) [rt.jar:1.7.0_79]
at org.drools.core.util.ClassUtils.getClassFromName(ClassUtils.java:755) [drools-core-6.4.0.Final.jar:6.4.0.Final]
at org.drools.core.common.DroolsObjectInputStream.resolveClass(DroolsObjectInputStream.java:57) [drools-core-6.4.0.Final.jar:6.4.0.Final]
at org.drools.core.common.DroolsObjectInputStream.resolveClass(DroolsObjectInputStream.java:62) [drools-core-6.4.0.Final.jar:6.4.0.Final]
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612) [rt.jar:1.7.0_79]
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517) [rt.jar:1.7.0_79]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) [rt.jar:1.7.0_79]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350) [rt.jar:1.7.0_79]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) [rt.jar:1.7.0_79]
at java.util.ArrayList.readObject(ArrayList.java:771) [rt.jar:1.7.0_79]
at sun.reflect.GeneratedMethodAccessor158.invoke(Unknown Source) [:1.7.0_79]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_79]
at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_79]
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017) [rt.jar:1.7.0_79]
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893) [rt.jar:1.7.0_79]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798) [rt.jar:1.7.0_79]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350) [rt.jar:1.7.0_79]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) [rt.jar:1.7.0_79]
at org.drools.core.marshalling.impl.SerializablePlaceholderResolverStrategy$SerializablePlaceholderStrategyContext.read(SerializablePlaceholderResolverStrategy.java:93) [drools-core-6.4.0.Final.jar:6.4.0.Final]
at org.drools.core.marshalling.impl.PersisterHelper.loadStrategiesIndex(PersisterHelper.java:327) [drools-core-6.4.0.Final.jar:6.4.0.Final]
at org.drools.core.marshalling.impl.PersisterHelper.loadStrategiesCheckSignature(PersisterHelper.java:273) [drools-core-6.4.0.Final.jar:6.4.0.Final]
at org.drools.core.marshalling.impl.PersisterHelper.readFromStreamWithHeaderPreloaded(PersisterHelper.java:289) [drools-core-6.4.0.Final.jar:6.4.0.Final]
at org.jbpm.marshalling.impl.AbstractProtobufProcessInstanceMarshaller.readProcessInstance(AbstractProtobufProcessInstanceMarshaller.java:474) [jbpm-flow-6.4.0.Final.jar:6.4.0.Final]
... 75 more
我是否需要jbpm中的任何配置?请指导
答案 0 :(得分:0)
解决。 将这些路径添加到wildfly 8中的sun / jdk / main / module.xml文件中。
path name="com/sun/org/apache/xerces/internal/jaxp/datatype"
path name="com/sun/jndi/rmi"
试图找到原因。