<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Deployment error on JBoss 7.0.2
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/jhouzard">Jean-François Houzard</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/779563#779563">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi! I'm trying to deploy my JBpm application on Jboss 7.0.2.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I have defined a persistence unit for both jbpm and my business entities.</p><p>I configured the Transaction Manager with Spring 3.1.3.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>To fix the error, I added the following element in my persistence unit: <mapping-file>META-INF/ProcessInstanceInfo.hbm.xml</mapping-file></p><p>but then I get another exception refering to my business entities:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>[...]</p><p>Caused by: java.lang.IllegalArgumentException: Not an managed type: class eu.publications.ceres.persistence.domain.Registration</p><p>[...]</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Do you have an idea why on tomcat everything works fine and on JBoss not?</p><p>What does JBoss behind the scene?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Thank you</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="text-decoration: underline;">persistence.xml:</span></p><p style="padding-left: 30px;"><persistence-unit name="ceres2013.persistence.unit"></p><p style="padding-left: 30px;">        <provider>org.hibernate.ejb.HibernatePersistence</provider></p><p style="padding-left: 30px;">        <mapping-file>META-INF/JBPMorm.xml</mapping-file></p><p style="padding-left: 30px;">        </p><p style="padding-left: 30px;">        <class>org.drools.persistence.info.SessionInfo</class></p><p style="padding-left: 30px;">        <class>org.drools.persistence.info.WorkItemInfo</class></p><p style="padding-left: 30px;">        <class>org.jbpm.process.audit.ProcessInstanceLog</class></p><p style="padding-left: 30px;">        <class>org.jbpm.process.audit.NodeInstanceLog</class></p><p style="padding-left: 30px;">        <class>org.jbpm.process.audit.VariableInstanceLog</class></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="padding-left: 30px;">        <properties></p><p style="padding-left: 30px;">            <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" /></p><p style="padding-left: 30px;">            <property name="hibernate.show_sql" value="false" /></p><p style="padding-left: 30px;">            <property name="hibernate.max_fetch_depth" value="4" /></p><p style="padding-left: 30px;">            <property name="hibernate.hbm2ddl.auto" value="validate" /></p><p style="padding-left: 30px;">        </properties></p><p style="padding-left: 30px;"></persistence-unit></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="text-decoration: underline;">applicationContext.xml:</span></p><p style="padding-left: 30px;"><bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"></p><p style="padding-left: 30px;">    <property name="entityManagerFactory" ref="entityManagerFactory" /></p><p style="padding-left: 30px;"></bean></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="padding-left: 30px;"><bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"></p><p style="padding-left: 30px;">    <property name="dataSource" ref="dataSource" /></p><p style="padding-left: 30px;">    <property name="persistenceUnitName" value="ceres2013.persistence.unit" /></p><p style="padding-left: 30px;"></bean></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="text-decoration: underline;">StackTrace:</span></p><p style="padding-left: 30px;">[...]</p><p style="padding-left: 30px;">Caused by: javax.persistence.PersistenceException: [PersistenceUnit: ceres2013.persistence.unit] Unable to build EntityManagerFactory</p><p style="padding-left: 30px;">          at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:900) [hibernate-entitymanager-3.5.4-Final.jar:]</p><p style="padding-left: 30px;">          at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74) [hibernate-entitymanager-3.5.4-Final.jar:]</p><p style="padding-left: 30px;">          [...]</p><p style="padding-left: 30px;">Caused by: org.hibernate.HibernateException: Errors in named queries: ProcessInstancesWaitingForEvent</p><p style="padding-left: 30px;">          at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:437) [hibernate-core-3.5.4-Final.jar:]</p><p style="padding-left: 30px;">  [...]</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/779563#779563">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>