<!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 Console Process List Error
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/tcharman">Timothy Charman</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/723692#723692">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><br/>I've tried installing JBPM console 5.2 (downloaded war) and 5.3 (compiled myself with maven) at separate times.  I am running in JBoss AS 7.0.2.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>In both cases I changed the login provider to be JAAS filesystem based/container managed.  I also changed the persistence to use MySQL through a JNDI datasource.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>If anyone has any ideas it would be much, much appreciated.  I just want to see my process in the web UI console.  Please <span> :) </span>.</p><h4>Dom4j Error</h4><p>In both versions I get:</p><p>Caused by: org.dom4j.DocumentException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory</p><p>when deploying jbpm-gwt-console-server.  To remedy this, I removed both dom4j jars (1.6 and 1.6.1) from WEB-INF/lib in the jbpm-gwt-console-server.  This lets me get past deployment.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I can log in to JBPM console server with no errors.  I get an error in rendering the task pane, but that seems to go away after the first time it renders.  I would paste it here, but the error has not occurred since I set the process pane to be default on login.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><h4>Errors in Console Server Process Pane </h4><p>I navigate to the process pane, hit refresh, and in both versions (5.2 and 5.3) I get an error.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><strong>5.2 gives this error:</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier;">19:03:49,119 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/gwt-console-server].[Resteasy]] (http--0.0.0.0-8080-7) Servlet.service() for servlet Resteasy threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Could not initialize stateful knowledge session: No Persistence provider for EntityManager named org.jbpm.persistence.jpa</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><strong>5.3 gives this error:</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier;">21:51:50,067 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/gwt-console-server].[Resteasy]] (http--0.0.0.0-8080-4) Servlet.service() for servlet Resteasy threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.NoClassDefFoundError: Could not initialize class org.jbpm.integration.console.StatefulKnowledgeSessionUtil$SessionHolder</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><h4>Persistence Config</h4><p>In both cases Hibernate is set to create the database, and the tables do get created.  I also set showsql to true, and I can see the database being created.</p><h5>hibernate.cfg.xml</h5><p>In the jbpm-gwt-console-server jar my WEB-INF/classes/META-INF/hibernate.cfg.xml looks like this:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier;"><?xml version='1.0' encoding='utf-8'?></span></p><p><span style="font-family: 'courier new', courier;"><!DOCTYPE hibernate-configuration PUBLIC</span></p><p><span style="font-family: 'courier new', courier;">        "-//Hibernate/Hibernate Configuration DTD 3.0//EN"</span></p><p><span style="font-family: 'courier new', courier;"><span>        "</span><a class="jive-link-external-small" href="http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd" target="_blank">http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd</a><span>"></span></span></p><p><span style="font-family: 'courier new', courier;"><hibernate-configuration></span></p><p><span style="font-family: 'courier new', courier;">    <session-factory></span></p><p><span style="font-family: 'courier new', courier;">        <!-- Database connection settings --></span></p><p><span style="font-family: 'courier new', courier;">        <property name="connection.datasource">java:jboss/datasources/jbpm</property></span></p><p><span style="font-family: 'courier new', courier;">        <!-- JDBC connection pool (use the built-in) --></span></p><p><span style="font-family: 'courier new', courier;">        <property name="connection.pool_size">1</property></span></p><p><span style="font-family: 'courier new', courier;">        <!-- SQL dialect --></span></p><p><span style="font-family: 'courier new', courier;">        <property name="dialect">org.hibernate.dialect.MySQLDialect</property></span></p><p><span style="font-family: 'courier new', courier;">        <!-- Enable Hibernate's automatic session context management --></span></p><p><span style="font-family: 'courier new', courier;">        <property name="current_session_context_class">thread</property></span></p><p><span style="font-family: 'courier new', courier;">        <!-- Disable the second-level cache  --></span></p><p><span style="font-family: 'courier new', courier;">        <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property></span></p><p><span style="font-family: 'courier new', courier;">        <!-- Echo all executed SQL to stdout --></span></p><p><span style="font-family: 'courier new', courier;">        <property name="show_sql">true</property></span></p><p><span style="font-family: 'courier new', courier;">        <!-- Drop and re-create the database schema on startup --></span></p><p><span style="font-family: 'courier new', courier;">        <property name="hbm2ddl.auto">create</property></span></p><p><span style="font-family: 'courier new', courier;">        <mapping resource="AuditLog.hbm.xml"/></span></p><p><span style="font-family: 'courier new', courier;">    </session-factory></span></p><p><span style="font-family: 'courier new', courier;"></hibernate-configuration></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><h5>persistence.xml</h5><p>and my WEB-INF/classes/META-INF/persistence.xml looks like this (5.2):</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier;"><?xml version="1.0" encoding="UTF-8" standalone="yes"?></span></p><p><span style="font-family: 'courier new', courier;"><persistence version="1.0"</span></p><p><span style="font-family: 'courier new', courier;"><span>             xsi:schemaLocation="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence" target="_blank">http://java.sun.com/xml/ns/persistence</a></span></p><p><span style="font-family: 'courier new', courier;"><span>                                 </span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" target="_blank">http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd</a></span></p><p><span style="font-family: 'courier new', courier;"><span>                                 </span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence/orm" target="_blank">http://java.sun.com/xml/ns/persistence/orm</a></span></p><p><span style="font-family: 'courier new', courier;"><span>                                 </span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" target="_blank">http://java.sun.com/xml/ns/persistence/orm_1_0.xsd</a><span>"</span></span></p><p><span style="font-family: 'courier new', courier;"><span>             xmlns:orm="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence/orm" target="_blank">http://java.sun.com/xml/ns/persistence/orm</a><span>"</span></span></p><p><span style="font-family: 'courier new', courier;"><span>             xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>"</span></span></p><p><span style="font-family: 'courier new', courier;"><span>             xmlns="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence" target="_blank">http://java.sun.com/xml/ns/persistence</a><span>"></span></span></p><p><span style="font-family: 'courier new', courier;">  <persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA"></span></p><p><span style="font-family: 'courier new', courier;">    <provider>org.hibernate.ejb.HibernatePersistence</provider></span></p><p><span style="font-family: 'courier new', courier;">    <jta-data-source>java:jboss/datasources/jbpm</jta-data-source></span></p><p><span style="font-family: 'courier new', courier;">    <mapping-file>META-INF/JBPMorm.xml</mapping-file></span></p><p><span style="font-family: 'courier new', courier;">    <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class></span></p><p><span style="font-family: 'courier new', courier;">    <class>org.drools.persistence.info.SessionInfo</class></span></p><p><span style="font-family: 'courier new', courier;">    <class>org.drools.persistence.info.WorkItemInfo</class></span></p><p><span style="font-family: 'courier new', courier;">    <properties></span></p><p><span style="font-family: 'courier new', courier;">      <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/></span></p><p><span style="font-family: 'courier new', courier;">      <property name="hibernate.max_fetch_depth" value="3"/></span></p><p><span style="font-family: 'courier new', courier;">      <property name="hibernate.hbm2ddl.auto" value="create" /></span></p><p><span style="font-family: 'courier new', courier;">      <property name="hibernate.show_sql" value="true" /></span></p><p><span style="font-family: 'courier new', courier;">      <property name="hibernate.transaction.manager_lookup_class" value="org.jbpm.integration.console.JBPMTransactionManager" /></span></p><p><span style="font-family: 'courier new', courier;">    </properties></span></p><p><span style="font-family: 'courier new', courier;">  </persistence-unit></span></p><p><span style="font-family: 'courier new', courier;"></persistence></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: arial, helvetica, sans-serif;">and like this in 5.3:</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier;"><?xml version="1.0" encoding="UTF-8" standalone="yes"?></span></p><p><span style="font-family: 'courier new', courier;"><persistence</span></p><p><span style="font-family: 'courier new', courier;">    version="1.0"</span></p><p><span style="font-family: 'courier new', courier;">    xsi:schemaLocation=</span></p><p><span style="font-family: 'courier new', courier;"><span>        "</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence" target="_blank">http://java.sun.com/xml/ns/persistence</a></span></p><p><span style="font-family: 'courier new', courier;"><span>         </span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" target="_blank">http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd</a></span></p><p><span style="font-family: 'courier new', courier;"><span>                 </span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence/orm" target="_blank">http://java.sun.com/xml/ns/persistence/orm</a></span></p><p><span style="font-family: 'courier new', courier;"><span>                 </span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" target="_blank">http://java.sun.com/xml/ns/persistence/orm_1_0.xsd</a><span>"</span></span></p><p><span style="font-family: 'courier new', courier;"><span>    xmlns:orm="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence/orm" target="_blank">http://java.sun.com/xml/ns/persistence/orm</a><span>"</span></span></p><p><span style="font-family: 'courier new', courier;"><span>    xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>"</span></span></p><p><span style="font-family: 'courier new', courier;"><span>    xmlns="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence" target="_blank">http://java.sun.com/xml/ns/persistence</a><span>"></span></span></p><p><span style="font-family: 'courier new', courier;">  <persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA"></span></p><p><span style="font-family: 'courier new', courier;">    <provider>org.hibernate.ejb.HibernatePersistence</provider></span></p><p><span style="font-family: 'courier new', courier;">    <jta-data-source>java:jboss/datasources/jbpm</jta-data-source></span></p><p><span style="font-family: 'courier new', courier;">    <mapping-file>META-INF/JBPMorm.xml</mapping-file></span></p><p><span style="font-family: 'courier new', courier;">    <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class></span></p><p><span style="font-family: 'courier new', courier;">    <class>org.drools.persistence.info.SessionInfo</class></span></p><p><span style="font-family: 'courier new', courier;">    <class>org.drools.persistence.info.WorkItemInfo</class></span></p><p><span style="font-family: 'courier new', courier;">    <class>org.jbpm.process.audit.ProcessInstanceLog</class></span></p><p><span style="font-family: 'courier new', courier;">    <class>org.jbpm.process.audit.NodeInstanceLog</class></span></p><p><span style="font-family: 'courier new', courier;">    <class>org.jbpm.process.audit.VariableInstanceLog</class></span></p><p><span style="font-family: 'courier new', courier;">    <properties></span></p><p><span style="font-family: 'courier new', courier;">      <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/></span></p><p><span style="font-family: 'courier new', courier;">      <property name="hibernate.max_fetch_depth" value="3"/></span></p><p><span style="font-family: 'courier new', courier;">      <property name="hibernate.hbm2ddl.auto" value="create" /></span></p><p><span style="font-family: 'courier new', courier;">      <property name="hibernate.show_sql" value="true" /></span></p><p><span style="font-family: 'courier new', courier;">      <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" /></span></p><p><span style="font-family: 'courier new', courier;">    </properties></span></p><p><span style="font-family: 'courier new', courier;">  </persistence-unit> </span></p><p><span style="font-family: 'courier new', courier;"></persistence></span></p><h5><span style="font-family: 'courier new', courier;">JBPMorm.xml</span></h5><p>and finally my WEB-INF/classes/META-INF/JBPMorm.xml looks like this:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier;"><?xml version="1.0" encoding="UTF-8"?></span></p><p><span style="font-family: 'courier new', courier;"><span><entity-mappings xmlns="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence/orm" target="_blank">http://java.sun.com/xml/ns/persistence/orm</a><span>"</span></span></p><p><span style="font-family: 'courier new', courier;"><span>               xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>"</span></span></p><p><span style="font-family: 'courier new', courier;"><span>               xsi:schemaLocation="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence/orm" target="_blank">http://java.sun.com/xml/ns/persistence/orm</a><span> orm_1_0.xsd"</span></span></p><p><span style="font-family: 'courier new', courier;">               version="2.0"></span></p><p><span style="font-family: 'courier new', courier;">      <named-query name="ProcessInstancesWaitingForEvent"></span></p><p><span style="font-family: 'courier new', courier;">          <query></span></p><p><span style="font-family: 'courier new', courier;">select</span></p><p><span style="font-family: 'courier new', courier;">    processInstanceInfo.processInstanceId</span></p><p><span style="font-family: 'courier new', courier;">from</span></p><p><span style="font-family: 'courier new', courier;">    ProcessInstanceInfo processInstanceInfo join processInstanceInfo.eventTypes eventTypes</span></p><p><span style="font-family: 'courier new', courier;">where</span></p><p><span style="font-family: 'courier new', courier;">    eventTypes = :type</span></p><p><span style="font-family: 'courier new', courier;">          </query></span></p><p><span style="font-family: 'courier new', courier;">      </named-query></span></p><p><span style="font-family: 'courier new', courier;"><sql-result-set-mapping name="ProcessInstancesWaitingForEvent.mapping"></span></p><p><span style="font-family: 'courier new', courier;">  <column-result name="InstanceId" /></span></p><p><span style="font-family: 'courier new', courier;"></sql-result-set-mapping></span></p><p><span style="font-family: 'courier new', courier;"><entity class="org.jbpm.persistence.processinstance.ProcessInstanceInfo"></span></p><p><span style="font-family: 'courier new', courier;">    <attributes></span></p><p><span style="font-family: 'courier new', courier;">        <element-collection name="eventTypes"></span></p><p><span style="font-family: 'courier new', courier;">            <collection-table name="EventTypes"></span></p><p><span style="font-family: 'courier new', courier;">                <join-column name="InstanceId" /></span></p><p><span style="font-family: 'courier new', courier;">            </collection-table></span></p><p><span style="font-family: 'courier new', courier;">        </element-collection></span></p><p><span style="font-family: 'courier new', courier;">    </attributes></span></p><p><span style="font-family: 'courier new', courier;"></entity> </span></p><p><span style="font-family: 'courier new', courier;"></entity-mappings></span></p><h5>JBPMorm.xml error</h5><p>Here you will see that I followed someone's (I forget whose) note that suggests changing JBPMorm.xml following getting this error:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: 'courier new', courier;">Caused by: org.hibernate.MappingException: Could not determine type for: java.util.Set, at table: ProcessInstanceInfo, for columns: [org.hibernate.mapping.Column(eventTypes)]</span></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/723692#723692">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>