0 Replies Latest reply on Dec 3, 2012 4:35 AM by Jean-François Houzard

    Deployment error on JBoss 7.0.2

    Jean-François Houzard Newbie

      Hi! I'm trying to deploy my JBpm application on Jboss 7.0.2.

       

      I have defined a persistence unit for both jbpm and my business entities.

      I configured the Transaction Manager with Spring 3.1.3.

       

      Everything works well on a Tomcat 7.0, but when I deploy on a Jboss 7.0.2 then I get a javax.persistence.PersistenceException.

       

      To fix the error, I added the following element in my persistence unit: <mapping-file>META-INF/ProcessInstanceInfo.hbm.xml</mapping-file>

      but then I get another exception refering to my business entities:

       

      [...]

      Caused by: java.lang.IllegalArgumentException: Not an managed type: class eu.publications.ceres.persistence.domain.Registration

      [...]

       

      Do you have an idea why on tomcat everything works fine and on JBoss not?

      What does JBoss behind the scene?

       

      Thank you

       

      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>

       

      StackTrace:

      [...]

      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:]

        [...]