[jboss-user] [jBPM Users] - JBPM4 Spring Integration Issue - No platformTransaction mana

faisalgeek do-not-reply at jboss.com
Tue Aug 25 10:16:24 EDT 2009


Our application is already spring + hibernate based, I am troubling to integrate your supposed jbpm spring integration method.

We already have, applicatonContext.cfg.xml, hibernate.cfg.xml & spring have a named session factory plus transaction manger & its configured with MS MSQL server.

Now, I have setup MySQL database for jbpm, now what should config files & architecture should have?

Please, tell me the what is problem, that i am getting below exception ????

jbpm.cfg.xml - JBPM Configurations

<?xml version="1.0" encoding="UTF-8"?>

<jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">

  <process-engine-context>
  
    <repository-service />
    <repository-cache />
    <execution-service />
    <history-service />
    <management-service />
    <task-service />
    <identity-service />
    <command-service>
      <retry-interceptor />
      <environment-interceptor />
      <spring-transaction-interceptor current="true"/>
      
      <!--<spring-transaction-interceptor />-->
    	
    </command-service>
    
    <hibernate-configuration>
           
    </hibernate-configuration>

    <deployer-manager>
      <jpdl-deployer />
    </deployer-manager>
    
    <script-manager default-expression-language="juel"
                    default-script-language="juel"
                    read-contexts="execution, environment, process-engine"
                    write-context="">
        <script-language name="juel" factory="org.jbpm.pvm.internal.script.JuelScriptEngineFactory" />
    </script-manager>
    
    

    <job-executor auto-start="false" />

    <id-generator />
    

    <business-calendar>
      
      
      
      
      
      
    </business-calendar>
  
  </process-engine-context>

  <transaction-context>
    <repository-session />
    <pvm-db-session />
    <job-db-session />
    <task-db-session />
    <message-session />
    <timer-session />
    <history-session />
    
    
    <hibernate-session />
    
    <hibernate-session current="true" />
    <identity-session />
  </transaction-context>

</jbpm-configuration>


jbpm.hibernate.cfg.xml – JBPM Hibernate Configurations

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
                                         "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
	<session-factory name="jbpm4-spring">
		false
	</session-factory>
</hibernate-configuration>

Spring Application Context Configurations

My application’s existing spring + hibernate configration

	
		
			classpath:com/netsol/unittest/config/hibernate.cfg.xml
		
	

	<bean id="hibernateConfiguration" factory-bean="&sessionFactory"
		factory-method="getConfiguration">
	

	
		
			
		
	
	<tx:annotation-driven transaction-manager="transactionManager"/>

JBPM + Spring Configurations

	
		<constructor-arg>
			com/netsol/unittest/config/jbpm.cfg.xml
		</constructor-arg>
		
	

	
	    
	    
	    
	    
	

	
		
	

	
		
		
			
				org.hibernate.dialect.MySQLDialect
			<!--	true
				 
				create-drop
				 -->
			
		
		
			
				classpath:com/netsol/config/jbpm.hibernate.cfg.xml
			
			
		
			
				classpath:jbpm.execution.hbm.xml
				classpath:jbpm.repository.hbm.xml
				classpath:jbpm.jpdl.hbm.xml
				classpath:jbpm.task.hbm.xml
				classpath:jbpm.history.hbm.xml
			
		
	

	<aop:aspectj-autoproxy/>

	<tx:advice id="txAdvice" transaction-manager="txManager">
		<tx:attributes>
			<tx:method name="get*" read-only="true" propagation="SUPPORTS" />
			<tx:method name="find*" read-only="true" propagation="SUPPORTS" />
			<tx:method name="*" propagation="REQUIRED" />
		</tx:attributes>
	</tx:advice>

	<aop:config>
		<aop:pointcut id="serviceOperation" expression="execution(* com.netsol.manager.impl.wf.**.*(..))" type="regex" />
		<aop:advisor advice-ref="txAdvice" pointcut-ref="serviceOperation" />
	</aop:config>
	

	<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" />

	<bean id="historyService" factory-bean="processEngine"
		factory-method="getHistoryService" />
		
	<bean id="managementService" factory-bean="processEngine"
		factory-method="getManagementService" />
		
	<bean id="taskService" factory-bean="processEngine"
		factory-method="getTaskService" />

	
		
		
		
		
		
		
		
	


Exception I am getting….. while testing my existing application’s configuration integrated with newly spring jpbm configuration. 

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.netsol.manager.impl.wf.BPMService.deployProcess(BPMService.java:40)
	at com.netsol.manager.impl.wf.BPMService$$FastClassByCGLIB$$e25347d6.invoke()
	at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
	at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:696)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631)
	at com.netsol.manager.impl.wf.BPMService$$EnhancerByCGLIB$$4ff49598.deployProcess()
	at com.netsol.manager.impl.wf.WorkFlowManagerImpl.generateProcessesJBPM(WorkFlowManagerImpl.java:1020)
	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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at $Proxy18.generateProcessesJBPM(Unknown Source)
	at com.netsol.unittest.wf.WorkFlowManagerTest.testGenerateProcessesJBPM(WorkFlowManagerTest.java:75)
	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 junit.framework.TestCase.runTest(TestCase.java:168)
	at junit.framework.TestCase.runBare(TestCase.java:134)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at junit.framework.TestSuite.run(TestSuite.java:227)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:91)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4251524#4251524

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4251524




More information about the jboss-user mailing list