日期:2014-05-17  浏览次数:20715 次

jbpm4.3与spring集成后发布问题


2010-04-01 15:46:09,874 WARN [org.jbpm.pvm.internal.repository.DeployerManager] - <WARNING: no objects were deployed! Check if you have configured a correct deployer in your jbpm.cfg.xml file for the type of eployment you want to do.>
[04/01 15:46:09] [WARN] DeployerManager: WARNING: no objects were deployed! Check if you have configured a correct deployer in your jbpm.cfg.xml file for the type of deployment you want to do.

配置方式如下
<bean id="springHelper" class="org.jbpm.pvm.internal.processengine.SpringHelper" />

  <bean id="processEngine" factory-bean="springHelper" factory-method="createProcessEngine" />
 
  <bean id="jbpmBo" class="com.szair.jbpm.bizlogic.impl.JbpmBOImpl">
<property name="processEngine" ref="processEngine"></property>
</bean>
 
<bean id="jbpmAction" class="com.szair.jbpm.action.JbpmAction" scope="session">
<property name="jbpmBo" ref="jbpmBo"></property>
</bean>

在struts2通过使用JbpmAction的deploy方法,调用jbpmBo.deploy(File file)
String value = this.getRepositoryService().createDeployment().addResourceFromFile(file).deploy();

奇怪的,同样的方法在单儿测试内却正常,没有问题。


------解决方案--------------------
可能是文件的路径不对吧,这里要用绝对路径。
下面这个方法用相对路径:repositoryService.createDeployment().addResourceFromClasspath("test.jpdl.xml").deploy();