[jboss-user] [JBoss jBPM] - Spring integration: No platformTransaction manager defined e
abecevello
do-not-reply at jboss.com
Tue Jul 21 14:11:20 EDT 2009
I'm trying to integrate jBPM into an existing Spring web application, however I have been unsuccessful in running a workflow with the Spring integrations.
Environment: Tomcat 6, Spring 2.5, jBPM 4.0, Hibernate 3.2.6.GA, Oracle 10g, running on Java 1.6 with Eclipse 3.4 (MyEclipse 7.5).
I have tried to configure jBPM with Spring according to the instructions in the developer guide (http://docs.jboss.com/jbpm/v4.0/devguide/html_single/#springIntegration), but so far it hasn't worked.
Tomcat will start successfully and the application can be used until any workflows are executed. Then I get the error:
| org.jbpm.api.JbpmException: No platformTransaction manager defined.
| at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:60)
| 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 com.apption.jbpm.JBPMHelloWorld.doStuff(JBPMHelloWorld.java:56)
my.jbpm.cfg.xml (located on classpath):
| <?xml version="1.0" encoding="UTF-8"?>
| <jbpm-configuration>
| <process-engine-context>
| <repository-service />
| <repository-cache />
| <execution-service />
| <history-service />
| <management-service />
| <identity-service />
| <task-service />
| <job-executor />
|
| <script-manager default-expression-language="juel"
| default-script-language="juel"
| read-contexts="execution, environment, process-engine, spring"
| write-context="">
| <script-language name="juel"
| factory="org.jbpm.pvm.internal.script.JuelScriptEngineFactory" />
| </script-manager>
|
| <command-service>
| <retry-interceptor />
| <environment-interceptor />
| <spring-transaction-interceptor />
| </command-service>
| </process-engine-context>
|
| <transaction-context>
| <repository-session />
| <db-session />
| <message-session />
| <timer-session />
| <history-session />
| <transaction />
| <hibernate-session current="true" />
| </transaction-context>
| </jbpm-configuration>
|
Relevant spring application context:
| <bean id="jbpmConfiguration" class="org.jbpm.pvm.internal.cfg.SpringConfiguration">
| <constructor-arg value="my.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" />
|
I can't figure out why this error is happening. I have an appropriate Spring sessionFactory defined in Spring, as well as the usual Spring hibernateTemplate and HibernateTransactionManager:
| <tx:annotation-driven transaction-manager="txManager" />
|
| <bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
| <property name="sessionFactory" ref="sessionFactory"/>
| <property name="jdbcExceptionTranslator" ref="jdbcExceptionTranslator"/>
| </bean>
|
| <bean id="txManager"
| class="org.springframework.orm.hibernate3.HibernateTransactionManager">
| <property name="sessionFactory" ref="sessionFactory" />
| <property name="prepareConnection">
| <value>false</value>
| </property>
| </bean>
|
Does anyone know why this error is happening and how to fix it?
Thanks!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4245086#4245086
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4245086
More information about the jboss-user
mailing list