我試圖在Jboss 7.0.2上部署我的JBpm應用程序。JBoss 7.0.2上的部署錯誤
我爲jbpm和我的業務實體定義了一個持久性單元。 我使用Spring 3.1.3配置了事務管理器。
在Tomcat 7.0上一切正常,但是當我部署在Jboss 7.0.2上時,我得到一個javax.persistence.PersistenceException。
要修正這個錯誤,我添加了以下元素在我的堅持單位:
<mapping-file>META-INF/ProcessInstanceInfo.hbm.xml</mapping-file>
但後來我得到另一個異常指的我的業務實體:
[...]
Caused by: java.lang.IllegalArgumentException: Not an managed type: class eu.publications.ceres.persistence.domain.Registration
[...]
你有一個想法爲什麼在tomcat上一切正常,並在JBoss不正常? JBoss在幕後做了什麼?
謝謝
的persistence.xml:
<persistence-unit name="ceres2013.persistence.unit">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<mapping-file>META-INF/JBPMorm.xml</mapping-file>
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
<class>org.jbpm.process.audit.ProcessInstanceLog</class>
<class>org.jbpm.process.audit.NodeInstanceLog</class>
<class>org.jbpm.process.audit.VariableInstanceLog</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />
<property name="hibernate.show_sql" value="false" />
<property name="hibernate.max_fetch_depth" value="4" />
<property name="hibernate.hbm2ddl.auto" value="validate" />
</properties>
</persistence-unit>
的applicationContext.xml:
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="persistenceUnitName" value="ceres2013.persistence.unit" />
</bean>
堆棧跟蹤:
[...]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: ceres2013.persistence.unit] Unable to build EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:900) [hibernate-entitymanager-3.5.4-Final.jar:]
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74) [hibernate-entitymanager-3.5.4-Final.jar:]
[...]
Caused by: org.hibernate.HibernateException: Errors in named queries: ProcessInstancesWaitingForEvent
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:437) [hibernate-core-3.5.4-Final.jar:]