<!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;">
jbpm 5.4 web app with JAP2
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/kamleshkoringa">Kamlesh Koringa</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/784907#784907">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</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I am trying to run simple web application in jboss as7. </p><p>below is my persistance.xml file</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA"></p><p>        <provider>org.hibernate.ejb.HibernatePersistence</provider></p><p>        <jta-data-source>java:jboss/datasources/DemoDS</jta-data-source></p><p>        <mapping-file>META-INF/JBPMorm.xml</mapping-file></p><p>       <strong style="color: #000000; font-size: 12px; background-color: #fcfbfa; font-family: 'courier new', courier;"> <mapping-file>META-INF/ProcessInstanceInfo.hbm.xml</mapping-file></strong></p><p>        </p><p>        <class>org.drools.persistence.info.SessionInfo</class></p><p>        <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class></p><p>        <class>org.drools.persistence.info.WorkItemInfo</class></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>        <properties></p><p>            <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" /></p><p>            <!-- property name="hibernate.show_sql" value="true" /> --></p><p>            <property name="hibernate.hbm2ddl.auto" value="create" /></p><p>            <property name="hibernate.jdbc.use_streams_for_binary" value="true" /></p><p>            <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" /></p><p>            <!--   property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.BitronixJtaPlatform" /--></p><p>            <!--  property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.BTMTransactionManagerLookup"/ --></p><p>        </properties></p><p>    </persistence-unit></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>If I add this line</p><p><span style="color: #000000; font-family: 'courier new', courier; font-size: 12px; background-color: #fcfbfa;"> <mapping-file>META-INF/ProcessInstanceInfo.hbm.xml</mapping-file></span></p><p>I got following errors.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">Caused by: org.hibernate.DuplicateMappingException: Duplicate collection role mapping org.jbpm.persistence.processinstance.ProcessInstanceInfo.eventTypes</p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">                at org.hibernate.cfg.Configuration$MappingsImpl.addCollection(Configuration.java:2582)</p><p style="background-color: #eef4f9; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">                at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2139)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I remove this line it give me following error</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>2012-06-19 16:47:59,278 ERROR [org.drools.persistence.SingleSessionCommandService] - <strong><Could not commit session> </strong><strong>java.lang.IllegalArgumentException: Unknown entity: org.jbpm.persistence.processinstance.ProcessInstanceInfo</strong></p><p>    at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:223)</p><p>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Please suggest what should I use.</p><p>Thanks</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/784907#784907">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>