使用Jbpm4.2 集成Spring 出现问题:
2009-11-12 15:49:51,640 ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'processEngine' defined in file
[......\WEB-INF\classes\spring\applicationContext-jbpm.xml]:
Instantiation of bean failed; nested exception is
org.springframework.beans.factory.BeanDefinitionStoreException: Factory
method [public org.jbpm.api.ProcessEngine
org.jbpm.pvm.internal.cfg.SpringConfiguration.buildProcessEngine()]
threw exception; nested exception is java.lang.NullPointerException
Caused by: java.lang.NullPointerException
at org.jbpm.pvm.internal.cfg.ProcessEngineImpl.checkDb(ProcessEngineImpl.java:177)
userCommandService 为null
经调试发现,使用Spring后userCommandService 确实是null,
配置中缺少什么东西?未知。 文档中并无特殊说明,
4.1没有出现问题~
应该是4.2的Bug
jBPM-4.2集成Spring的方法,请参考这里:
http://www.family168.com/jbpm4/spring-jbpm42.html
jBPM-4.2默认提供的与spring整合的文件存在重大问题,使用官方推荐的配置方式根本无法启动流程引擎,需要进行如下修改:
第1步:将下面的内容保存为jbpm.tx.spring42.cfg.xml:
<?xml version="1.0" encoding="UTF-8"?>
<jbpm-configuration>
<process-engine-context>
<command-service name="txRequiredCommandService">
<skip-interceptor />
<retry-interceptor />
<environment-interceptor />
<spring-transaction-interceptor />
</command-service>
<command-service name="newTxRequiredCommandService">
<retry-interceptor />
<environment-interceptor policy="requiresNew" />
<spring-transaction-interceptor />
</command-service>
</process-engine-context>
<transaction-context>
<transaction />
<hibernate-session />
</transaction-context>
</jbpm-configuration>
第2步:将jbpm.tx.spring42.cfg.xml放在classpath下。
第3步:修改jbpm.cfg.xml,使用jbpm.tx.spring42.cfg.xml替换默认的jbpm.tx.spring.cfg.xml:
<?xml version="1.0" encoding="UTF-8"?>
<jbpm-configuration>
<import resource="jbpm.default.cfg.xml" />
<import resource="jbpm.businesscalendar.cfg.xml" />
<import resource="jbpm.tx.spring42.cfg.xml" />
<import resource="jbpm.jpdl.cfg.xml" />
<import resource="jbpm.identity.cfg.xml" />
<!-- Job executor is excluded for running the example test cases. -->
<!-- To enable timers and messages in production use, this should be included. -->
<!--
<import resource="jbpm.jobexecutor.cfg.xml" />
-->
<import resource="jbpm.mail.templates.examples.xml" />
</jbpm-configuration>
分享到:
相关推荐
jBPM 4.2 HelloWorld实例,jBPM 4.2 HelloWorld实例
jbpm4.2 doc(JBPM开发文档) jbpm4.2 doc(JBPM开发文档) 欢迎大家下载。。。
jbpm4 集成 spring 的试用代码 spring2.5 hibernate3.3 jbpm4 beta1 后的svn版本
jbpm4.2开发是一个适合初学者看的文档,里面讲的很全面。
jbpm4.2 src(JBPM源码) 欢迎下载。。。。
jbpm4.2 examples(JBPM开发事例) 欢迎大家下载
jbpm4.2jar
spring与jbpm的集成包(符集成方法)
jbpm4.3与spring整合的一个小文档
jbpm4.2 install
jbpm 4.3 与 spring 集成
风中叶老师讲的JBPM4与Spring整合例子代码 JBPM4 Spring OA工作流系统
近期网上有人介绍jBPM4与Spring整合的2种方式,但没有人贴出代码,闲着无聊写了个例子,源码见附件,在WEBLOGIC下运行正常,事务由spring控制http://ip:7001/Spring/helloWorld.do
jbpm与spring集成开发指南,描述了jbpm与spring开发过程。
JBPM4.4+spring+ext整合
JBPM5+Spring+Hibernate+MySQL 请假例子
jbpm5.4 spring mvc 集成开发 Jetty maven JTA 事务等配置!
经典的jbpm5整合例子,自动简表。只要保证数据库打开就可以了。运行简单,附带详细的使用说明。是jbpm学习开发则的必背资源。
JBPM4.3与Spring会签 实例,欢迎交流ningjinlin@gmail.com
JBPM与Spring集成开发指南.docx