[jboss-user] [JBoss jBPM] - Re: jBPM 3.2 using CMT

Xavi345 do-not-reply at jboss.com
Thu Oct 16 04:46:19 EDT 2008


Hi!

First of all, sorry for my english, it isn't my native language.

I have the same problem that MSchmidke when the jbpm configuration is being created with spring.

My jbpm.cfg.xml file is :
<jbpm-configuration>
  | 
  |   <!-- 
  |     The default configurations can be found in org/jbpm/default.jbpm.cfg.xml 
  |     Those configurations can be overwritten by putting this file called 
  |     jbpm.cfg.xml on the root of the classpath and put in the customized values.
  |   -->
  |   	 
  | 	<jbpm-context name='default.jbpm.context'>
  | 		<service name='persistence' 
  | factory='org.jbpm.persistence.db.DbPersistenceServiceFactory' />
  | 		<service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
  | 	</jbpm-context>
  | 	
  | 	<string name='resource.business.calendar' value='org/jbpm/calendar/jbpm.business.calendar.properties' />
  | 	 <string name='resource.default.modules' value='org/jbpm/graph/def/jbpm.default.modules.properties' />
  | 	 <string name='resource.converter' value='org/jbpm/db/hibernate/jbpm.converter.properties' />
  | 	 <string name='resource.action.types' value='org/jbpm/graph/action/action.types.xml' />
  | 	 <string name='resource.node.types' value='org/jbpm/graph/node/node.types.xml' />
  | 	 <string name='resource.parsers' value='org/jbpm/jpdl/par/jbpm.parsers.xml' />
  | 	 <string name='resource.varmapping' value='org/jbpm/context/exe/jbpm.varmapping.xml' />
  | 	
  | 	 <int name='jbpm.byte.block.size' value="1024" singleton="true" />
  | 	 <bean name='jbpm.task.instance.factory' class='org.jbpm.taskmgmt.impl.DefaultTaskInstanceFactoryImpl' singleton='true' />
  | 	 <bean name='jbpm.variable.resolver' class='org.jbpm.jpdl.el.impl.JbpmVariableResolver' singleton='true' />
  | 	
  | 	
  | </jbpm-configuration>
  | 

And my spring applicationContext is like that

  | <?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:aop="http://www.springframework.org/schema/aop"
  | 	xsi:schemaLocation="http://www.springframework.org/schema/beans 
  | 		http://www.springframework.org/schema/beans/spring-beans.xsd
  | 		http://www.springframework.org/schema/aop
  |         http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">	
  | 	
  | 	 
  | 	<bean id="sessionFactory2" autowire-candidate="false"
  | 		class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
  | 		<property name="dataSource" ref="dataSource" />
  | 		<property name="mappingLocations">
  | 			<value>classpath:hibernate.cfg.xml</value>
  | 		</property>
  | 		<property name="hibernateProperties">
  | 			<props>
  | 				<prop key="hibernate.dialect">
  | 					org.hibernate.dialect.HSQLDialect
  | 				</prop>
  | 				<prop key="hibernate.cache.provider_class">
  | 					org.hibernate.cache.EhCacheProvider
  | 				</prop>
  | 				<prop key="hibernate.hbm2ddl.auto">create-drop</prop>
  | 			</props>
  | 		</property>
  | 	</bean>	
  |   	
  |   	<!-- jBPM configuration -->
  | 	<bean id="jbpmConfiguration" 
  | 	    class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBean">
  | 	  <property name="configuration" value="classpath:jbpm.cfg.xml"/>
  | 	  <property name="sessionFactory" ref="sessionFactory2" />
  | 	  <property name="processDefinitionsResources">
  | 	  	<list>
  | 	  		<value>classpath:EjemploSpring/processdefinition.xml</value>
  | 	  	</list>
  | 	  </property>
  | 	  <property name="createSchema" value="true"/>	  
  | 	</bean>
  | 	
  | </beans>
  | 

When Spring is initializating the beans, i have the following error:


  |  ...
  | Caused by: org.hibernate.MappingException: Named query not known: GraphSession.findLatestProcessDefinitionQuery
  | 	at org.hibernate.impl.AbstractSessionImpl.getNamedQuery(AbstractSessionImpl.java:70)
  | 	at org.hibernate.impl.SessionImpl.getNamedQuery(SessionImpl.java:1260)
  | 	at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:151)
  | 	... 37 more
  | 

I have red the hole post but i don't understand the answer of MSchmidke. I'm using a DbPersistenceServiceFactory but it doesn't solve the problem.

I willl be very greatful if you answer me

Thanks a lot

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

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



More information about the jboss-user mailing list