4 Replies Latest reply on Jul 25, 2009 11:15 AM by jack asdf

    About Spring-integeration of JBPM4 with Spring 2.5

    jack asdf Newbie

      Hi all
      i try to integerate spring2.5 with jbpm4 accroding to userguide ,but some error occured when i invoke RepositoryService to deploy a new processDefine
      flowwing is my congruation file
      spring context

      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:p="http://www.springframework.org/schema/p"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
       http://www.springframework.org/schema/context
       http://www.springframework.org/schema/context/spring-context-2.5.xsd">
      
      
       <bean id="jbpmConfiguration" class="org.jbpm.pvm.internal.cfg.SpringConfiguration">
       <constructor-arg value="jbpm.cfg.xml" />
       </bean>
       <bean id="processEngine" factory-bean="jbpmConfiguration" factory-method="buildProcessEngine" />
       <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
       <bean id="executionService" factory-bean="processEngine" factory-method="getExecutionService" />
      
      
      </beans>
      


      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
       <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
       <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
       <property name="url" value="jdbc:mysql://localhost/jbpm"/>
       <property name="username" value="root"/>
       <property name="password" value=""/>
       </bean>
      
       <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
       <property name="dataSource" ref="dataSource"/>
       <property name="mappingResources">
       <list>
       <value>jbpm.execution.hbm.xml</value>
       <value>jbpm.history.hbm.xml</value>
       <value>jbpm.identity.hbm.xml</value>
       <value>jbpm.repository.hbm.xml</value>
       <value>jbpm.task.hbm.xml</value>
       </list>
       </property>
       <property name="hibernateProperties">
       <value>
       hibernate.dialect=org.hibernate.dialect.MySQLDialect
       hibernate.format_sql=true
       hibernate.show_sql=true
       hibernate.hbm2ddl.auto=update
       </value>
       </property>
       </bean>
       <bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
       <property name="sessionFactory" ref="sessionFactory" />
       </bean>
      
      
      </beans>
      
      


      <?xml version="1.0" encoding="UTF-8"?>
      
      <jbpm-configuration>
      
       <process-engine-context>
       <command-service>
       <retry-interceptor />
       <environment-interceptor />
       <spring-transaction-interceptor current="true" />
       </command-service>
       </process-engine-context>
      
       <transaction-context>
       <hibernate-session current="true" />
       </transaction-context>
      
      </jbpm-configuration>
      

      <?xml version="1.0" encoding="UTF-8"?>
      <jbpm-configuration>
       <import resource="jbpm.default.cfg.xml" />
       <import resource="jbpm.tx.hibernate.cfg.xml" />
       <import resource="jbpm.jpdl.cfg.xml" />
       <import resource="jbpm.identity.cfg.xml" />
       <import resource="jbpm.jobexecutor.cfg.xml" />
      </jbpm-configuration>

      when to use to deploy server throws stacks


      [Line:3768]: Exception sending context initialized event to listener instance of class org.jackysoft.listener.JbpmInitializeListener -[org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3768)]-2009-07-25 12:37:39,453
      org.springframework.transaction.IllegalTransactionStateException: No existing transaction found for transaction marked with propagation 'mandatory'
      at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:363)
      at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:125)
      at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:79)
      at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)
      at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
      at org.jbpm.pvm.internal.repository.DeploymentImpl.deploy(DeploymentImpl.java:89)
      at org.jackysoft.listener.JbpmInitializeListener.contextInitialized(JbpmInitializeListener.java:50)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
      at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:927)
      at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:890)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
      at org.apache.catalina.core.StandardService.start(StandardService.java:448)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
      2009-7-25 12:37:39 org.apache.catalina.core.StandardContext start
      严�: Error listenerStart
      2009-7-25 12:37:39 org.apache.catalina.core.StandardContext start
      严�: Context [/myoa] startup failed due to previous errors

      can some one to figura out reason!!!