- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我是 Apache Camel 与 alfresco activiti 集成的新手,我在运行下面的程序时遇到错误。
异常
Exception in thread "main" org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[ID-Ravi-59907-1467728441130-0-2]
at org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1706)
at org.apache.camel.util.ExchangeHelper.extractResultBody(ExchangeHelper.java:660)
at org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:471)
at org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:133)
at org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:149)
at org.apache.camel.impl.DefaultProducerTemplate.requestBody(DefaultProducerTemplate.java:301)
at org.quick.AppMain.main(AppMain.java:32)
Caused by: org.activiti.engine.ActivitiException: Couldn't serialize value '[DefaultMessageHistory[routeId=route1, node=setProperty1], DefaultMessageHistory[routeId=route1, node=setBody1]]' in variable 'CamelMessageHistory'
at org.activiti.engine.impl.variable.SerializableType.serialize(SerializableType.java:95)
at org.activiti.engine.impl.variable.SerializableType.setValue(SerializableType.java:69)
at org.activiti.engine.impl.persistence.entity.VariableInstanceEntity.setValue(VariableInstanceEntity.java:178)
at org.activiti.engine.impl.persistence.entity.VariableInstanceEntity.create(VariableInstanceEntity.java:74)
at org.activiti.engine.impl.persistence.entity.VariableInstanceEntity.createAndInsert(VariableInstanceEntity.java:60)
at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.createVariableInstance(VariableScopeImpl.java:839)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.createVariableInstance(ExecutionEntity.java:1175)
at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.createVariableLocal(VariableScopeImpl.java:752)
at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.createVariableLocal(VariableScopeImpl.java:739)
at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.setVariable(VariableScopeImpl.java:633)
at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.setVariable(VariableScopeImpl.java:590)
at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.setVariables(VariableScopeImpl.java:534)
at org.activiti.camel.CamelBehaviour.execute(CamelBehaviour.java:45)
at org.activiti.engine.impl.delegate.ActivityBehaviorInvocation.invoke(ActivityBehaviorInvocation.java:34)
at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37)
at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:25)
at org.activiti.engine.impl.bpmn.behavior.ServiceTaskDelegateExpressionActivityBehavior.execute(ServiceTaskDelegateExpressionActivityBehavior.java:98)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:60)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:97)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:636)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:629)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:52)
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:97)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:636)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:629)
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:97)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:636)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:629)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreateScope.java:49)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:97)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:636)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:629)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake.execute(AtomicOperationTransitionNotifyListenerTake.java:80)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:97)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:636)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:629)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionDestroyScope.execute(AtomicOperationTransitionDestroyScope.java:116)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:97)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:636)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:629)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerEnd.java:35)
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:97)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:636)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:629)
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:97)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:636)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:629)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:453)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:431)
at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:140)
at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:66)
at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44)
at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.execute(FlowNodeActivityBehavior.java:36)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:60)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:97)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:636)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:629)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationProcessStartInitial.eventNotificationsCompleted(AtomicOperationProcessStartInitial.java:45)
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:97)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:636)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:629)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationProcessStart.eventNotificationsCompleted(AtomicOperationProcessStart.java:64)
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:97)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:636)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:629)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.start(ExecutionEntity.java:381)
at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:110)
at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:37)
at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:37)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
at org.activiti.engine.impl.RuntimeServiceImpl.startProcessInstanceByKey(RuntimeServiceImpl.java:80)
at org.activiti.camel.ActivitiProducer.startProcess(ActivitiProducer.java:168)
at org.activiti.camel.ActivitiProducer.process(ActivitiProducer.java:65)
at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145)
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
at org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:68)
at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:412)
at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:380)
at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:270)
at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:380)
at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:238)
at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:128)
at org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:132)
... 3 more
Caused by: java.io.NotSerializableException: org.apache.camel.impl.DefaultMessageHistory
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at java.util.ArrayList.writeObject(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at org.activiti.engine.impl.variable.SerializableType.serialize(SerializableType.java:93)
... 104 more
Java 类
package org.quick;
import java.util.Collections;
import java.util.List;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.activiti.engine.task.Task;
import org.apache.camel.CamelContext;
import org.apache.camel.ProducerTemplate;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class AppMain {
public static void main(String[] args) throws Exception {
ApplicationContext applicationContext = new ClassPathXmlApplicationContext(
"application-context.xml");
RepositoryService repositoryService =
(RepositoryService) applicationContext.getBean("repositoryService");
String deploymentId = repositoryService
.createDeployment()
.addClasspathResource("helloworld.bpmn")
.deploy()
.getId();
System.out.print( "process id is :" +deploymentId);
CamelContext cxt = (CamelContext) applicationContext.getBean("camelProcess");
RuntimeService runService= (RuntimeService) applicationContext.getBean("runtimeService");
ProducerTemplate tpl = cxt.createProducerTemplate();
String instanceId = (String) tpl.requestBody("direct:start", Collections.singletonMap("var1", "hello"));
String str = (String) runService.getVariable(instanceId, "var2");
System.out.print(str);
System.out.print(str);
TaskService taskService = (TaskService) applicationContext.getBean("taskService");
//Retrieving the tasks assigned for the candidate group Register
List<Task> tasks = taskService.createTaskQuery().taskCandidateGroup("Register").list();
for (Task task : tasks) {
System.out.println("Following task is available for register group: " + task.getName());
// claim it
taskService.claim(task.getId(), "rupa");
}
// Verify Fozzie can now retrieve the task
tasks = taskService.createTaskQuery().taskAssignee("rupa").list();
for (Task task : tasks) {
System.out.println("Task for roopa: " + task.getName());
// Complete the task
//taskService.complete(task.getId());
}
System.out
.println("Number of tasks for roopa: " + taskService.createTaskQuery().taskAssignee("rupa").list().size());
}
}
XML -- 应用上下文
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd ">
<import resource="classpath:activiti-application-context.xml" />
<import resource="classpath:camel-application-context.xml" />
</beans>
camel-application-context.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<camelContext id="camelProcess" xmlns="http://camel.apache.org/schema/spring">
<routeBuilder ref="myBuilder" />
</camelContext>
<bean id="myBuilder" class="org.quick.CamelRouteBuilder"/>
<bean id="camel" class="org.activiti.camel.CamelBehaviour">
<constructor-arg index="0">
<list>
<bean class="org.activiti.camel.SimpleContextProvider">
<constructor-arg index="0" value="helloCamelProcess" />
<constructor-arg index="1" ref="camelProcess" />
</bean>
</list>
</constructor-arg>
</bean>
</beans>
最佳答案
看起来变量 CamelMessageHistory 中的 POJO 值不是可序列化的...
Couldn't serialize value '[DefaultMessageHistory[routeId=route1, node=setProperty1], DefaultMessageHistory[routeId=route1, node=setBody1]]' in variable 'CamelMessageHistory' at org.activiti.engine.impl.variable.SerializableType.serialize(SerializableType.java:95) at
关于apache-camel - 组织.apache.camel.CamelExecutionException : Exception occurred during execution on the exchange,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38206039/
我是 Django 新手并开始了一个项目,我想以正确的方式去做。 我想知道您认为组织项目的最佳实践是什么。 以下是我的一些问题: 如何将静态资源与 Python 代码分开,以免浪费时间通过 Djang
通过这个组织,是否可以引用“id”属性? function house(id) { this.id = id } house.prototype.buy = function() { }
我的任务是“识别并修复任何错误”。这张取自 Java 教科书的图片显示了 Swing 结构的组织。这对我来说很好,我没有发现任何问题。 谁能解释一下? JPanel 应该放在 JComponent 之
重要的事情 是否可以确定 WHERE 条件的最佳顺序以使其更快?例如,我有一个包含 6 个条件的查询。一些简单,另一些带有子查询或函数。我的想法是对查询进行概要分析,以确定条件语句 true 的常见程
我有 Java/AS3/Javascript 背景,我的所有类都组织成包,以帮助表示它们的功能。 在开始一个 C++ 项目时,我试图以几乎相同的方式模仿这个文件系统结构,但我一直遇到包含问题。 目前我
我正在使用 CKAN 作为开放数据门户。我已经完成了 CKAN 实例的设置并添加了数据集、组和组织。 主页上有一个特色组和一个特色组织框。如何在主页上显示我想要的组和组织。 如何在主页上更改这些特色组
我已经创建了我的第一个 iPhone 应用程序,它可以在表格 View 中显示类似类型的音轨。用户可以使用类似 ipod 的控件来播放音轨,这些控件可以流式传输 mp3。 我的所有代码都在两个主要类中
我将我的代码组织成 20-60 行模块,通常采用模块模式。我想要一个结构良好的面向对象的 JavaScript 库。 这是最好的方法吗?代码已经过测试并且有效。 我喜欢它,因为程序员可以从库中提取模块
我正在使用 riot.js 和 jquery 构建一个应用程序。一切都按预期工作,但是随着代码的增长,我也担心在代码中随机/意外的地方触发和处理事件 (.trigger/.on) 对保持我的代码有条理
这是另一个 GIT 新手。 我想在我们的项目中使用 GIT。 团队不熟悉 GIT。 这些项目基本上由一些通用项目(*)和一些应用项目组成。应用程序正在使用公地,公地也可以使用其他公地。通过“使用”我的
例如,考虑一个组织有一个包含两个分支的存储库的情况,master 和 1.0.0.1。 是否可以让团队对 master 具有只读访问权限,而对分支 (1.0.0.1) 具有读写访问权限? 最佳答案 自
我一直致力于寻找组织 CSS 代码的最佳方式,尤其是在大型网站上。我对编写风格不太感兴趣,而对人们如何构建和管理他们的代码更感兴趣。 我一直在遵循这个结构,我觉得它在可维护性方面工作得很好,但我想听取
我们正在扩展到一个大型微服务构建,并通过 postman 完成更多测试(现场验证、错误测试等)。好奇...您的团队如何组织大量 API 的集合? (按 API、按测试类型、按发布等)从一个团队传递到另
我最近遇到了这个编码面试问题,但似乎找不到答案。这是问题。 给定一个整数数组,编写一个函数,返回组织数组所需的最小交换,使得相邻元素的绝对差都小于或等于 K。交换可以是任意两个数组元素,不一定是相邻的
我有 100 多页。所有页面都使用不同的模板。 目前,我有一长串 .state('page.html').state('page2.html') 等。10-15 页后,我认为这变得不可读/难以管理。
我看下grails-app/i18n有一吨messages*.properties捆绑。我想将我的应用程序国际化,但每页有 1 个“捆绑集”。我所说的包集是指包含相同文本但用于不同语言的一组包/属性文
我正在编写一个非常非常长的 CUDA 内核,它对人类的可读性来说非常糟糕。有什么方法可以用内核外部的功能组织 CUDA 内核吗?示例: __global__ void CUDA_Kernel(int*
我的公司要求我将Outlook用于我的电子邮件。 Outlook几乎不执行我想做的任何事情,这让我感到非常沮丧。 (我并不是要在这里发动一场火焰大战,它必须完全执行数千名CEO想要做的事情,但我不是C
我一直在尝试一些不同的方法来组织我的 javascript 应用程序中的代码,我想知道哪种方法最合适。 第一个例子: var Application = { init: function()
Angular 样式指南包含有关在应用程序中使用类和接口(interface)的最佳实践的信息。但它没有任何关于如何组织我的接口(interface)和模型类的信息。 有一个问题:关于文件和类的组织有
我是一名优秀的程序员,十分优秀!