[jboss-user] [jBPM Users] - Re: Problem moving from 4.1 to 4.2 using Spring configuratio

hrworx do-not-reply at jboss.com
Mon Nov 16 11:02:45 EST 2009


Thanks again for the reply.  This is going to be a useful thread for others someday, hopefully.

OK, the same problem still remains with Unknown Entity: PropertyImpl

Here are the relevant configuration files as they currently exist:

  | <jbpm-configuration>
  |   <import resource="jbpm.businesscalendar.cfg.xml" />
  |   <import resource="jbpm.jpdl.cfg.xml" />
  | 
  |   <process-engine-context>
  |     <repository-service />
  |     <repository-cache />
  |     <execution-service />
  |     <history-service />
  |     <management-service />
  |     <task-service />
  |     <identity-service />
  |     <command-service name="txRequiredCommandService">
  |       <retry-interceptor />
  |       <environment-interceptor />
  |       <spring-transaction-interceptor />
  |     </command-service>
  | 
  |     <object class="org.jbpm.pvm.internal.id.DatabaseDbidGenerator">
  |       <field name="commandService">
  |         <ref object="txRequiredCommandService" />
  |       </field>
  |     </object>
  | 
  |     <object class="org.jbpm.pvm.internal.id.DatabaseIdComposer"
  |       init="eager" />
  | 
  |     <import resource="jbpm.jobexecutor.cfg.xml" />
  |     <types resource="jbpm.variable.types.xml" />
  |   </process-engine-context>
  | 
  |   <transaction-context>
  |     <repository-session />
  |     <db-session />
  |     <message-session />
  |     <timer-session />
  |     <history-session />
  | 
  |     <object class="com.hrworx.formworx.service.user.JbpmIdentitySessionImpl" />
  |     <transaction />
  |     <hibernate-session current="false" />
  |   </transaction-context>
  | 
  | </jbpm-configuration>

<persistence-unit name="formworxPU">
  |     <provider>org.hibernate.ejb.HibernatePersistence</provider>
  |     <properties>
  |       <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />
  |       <property name="hibernate.show_sql" value="false" />
  |       <property name="hibernate.format_sql" value="false" />
  |       <property name="hibernate.archive.autodetection" value="class" />
  |       <property name="hibernate.connection.url" value="jdbc:hsqldb:target/test-hibernate" />
  |       <property name="hibernate.connection.username" value="sa" />
  |       <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver" />
  |       <property name="mappingLocations">
  |         <list>
  |           <value>classpath:jbpm.execution.hbm.xml</value>
  |           <value>classpath:jbpm.repository.hbm.xml</value>
  |           <value>classpath:jbpm.task.hbm.xml</value>
  |           <value>classpath:jbpm.history.hbm.xml</value>
  |         </list>
  |       </property>
  |     </properties>
  |   </persistence-unit>
  | </persistence>

 <bean id="entityManagerFactory"
  |     class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
  |     <property name="jpaVendorAdapter" ref="jpaVendorAdapter" />
  |     <property name="persistenceUnitManager" ref="persistenceUnitManager" />
  |   </bean>
  | 
  |   <!-- Publishing session factory for use in jBPM -->
  |   <bean id="sessionFactory" factory-bean="entityManagerFactory"
  |     factory-method="getSessionFactory">
  |   </bean>

If I comment out the sessionFactory bean I get:
Factory method [public org.jbpm.api.ProcessEngine org.jbpm.pvm.internal.cfg.SpringConfiguration.buildProcessEngine()] threw exception; nested exception is org.jbpm.pvm.internal.wire.WireException: couldn't find hibernate-session-factory by type to open a hibernate-session

If I do leave the sessionFactory defined, then I get the same old error:
Factory method [public org.jbpm.api.ProcessEngine org.jbpm.pvm.internal.cfg.SpringConfiguration.buildProcessEngine()] threw exception; nested exception is org.hibernate.MappingException: Unknown entity: org.jbpm.pvm.internal.id.PropertyImpl

My pom.xml contains the following entry:
 <dependency>
  |       <groupId>org.jbpm.jbpm4</groupId>
  |       <artifactId>jbpm-pvm</artifactId>
  |       <version>4.2</version>
  |     </dependency>

and when I look in my repository, I find jbpm-pvm-4.2.jar which contains jbpm.repository.hbm.xml which contains:
  <class name="org.jbpm.pvm.internal.id.PropertyImpl" table="JBPM4_PROPERTY">
  |     <id name="key" column="KEY_">
  |       <generator class="assigned" />
  |     </id>
  |     <version name="version" column="VERSION_" />
  |     <property name="value" column="VALUE_" />
  |   </class> 



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

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



More information about the jboss-user mailing list