浏览 6018 次
该帖已经被评为新手帖
|
|
---|---|
作者 | 正文 |
发表时间:2006-11-01
下面将我的整合步骤简单描述一下: 首先我用 eclipse3.2+spring2+hibernate3.2 结合做了一个小例子,运行成功,使用的是声明式的事务。 接着我在上面的例子上加载了 spring-modules-0.6,因为这个模块里加载的是jbpm-3.1.1.jar而且还缺少了jbpm-identity-3.x.jar,于是我用jbpm3.1.2替换到了3.1.1,将我能够单独运行成功的websale例子按照spring-modules提供的手册上面的步骤进行了配置,一运行,jbpm的表正确生成了,但是生成jbpmConfiguration失败了,跳出了异常: Caused by: org.hibernate.MappingException: Unknown entity: org.jbpm.context.def.VariableAccess at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:547) at org.hibernate.impl.SessionFactoryImpl.evict(SessionFactoryImpl.java:845) 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:585) at org.springframework.orm.hibernate3.AbstractSessionFactoryBean$TransactionAwareInvocationHandler.invoke(AbstractSessionFactoryBean.java:284) at $Proxy0.evict(Unknown Source) at org.jbpm.db.hibernate.HibernateHelper.clearHibernateCache(HibernateHelper.java:129) at org.jbpm.persistence.db.DbPersistenceServiceFactory.createSchema(DbPersistenceServiceFactory.java:108) at org.jbpm.JbpmConfiguration.createSchema(JbpmConfiguration.java:415) at org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBean.afterPropertiesSet(LocalJbpmConfigurationFactoryBean.java:136) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029) ... 23 more 下面是我的spring关于jbpm的配置 <!-- reading jBPM process definitions --> <bean id="websaleWorkflow1" class="org.springmodules.workflow.jbpm31.definition.ProcessDefinitionFactoryBean"> <property name="definitionLocation" value="processdefinition.xml"/> </bean> <!-- jBPM configuration--> <bean id="jbpmConfiguration" class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBean"> <property name="sessionFactory" ref="sessionFactory"/> <property name="configuration" value="jbpm.cfg.xml"/> <property name="processDefinitions"> <list> <ref local="websaleWorkflow1"/> </list> </property> <property name="createSchema" value="true"/> </bean> <!-- jBPM template --> <bean id="jbpmTemplate" class="org.springmodules.workflow.jbpm31.JbpmTemplate"> <constructor-arg index="0" ref="jbpmConfiguration"/> <constructor-arg index="1" ref="websaleWorkflow1"/> </bean> 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2006-11-02
检查 sessionFacory 配置 jbpm 相关 *.hbm.xml .
应该是这里的问题. |
|
返回顶楼 | |
发表时间:2006-11-03
我的spring配置文件
<!-- Hibernate SessionFactory --> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource"> <ref local="dataSource"/> </property> </bean> 没有定义mapping xml,所有jbpm mapping是在hibernate.cfg.xml中.可以生成jbpm的那些表。 |
|
返回顶楼 | |