<!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;">
    Problem yith Human Task query
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/fdernb">Fred DERNBACH</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/792549#792549">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;">&#160;</p><p>I'm setting up JBPM 5.4.0.Final over hibernate and Oracle. I'm using LocalTaskService, JPA 1 persistence unit over hibernate. It is working, a sample process can be started.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>But I'm struggling with a named query that does not return tasks while it should.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>To retrieve tasks, I'm now trying to call:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>public List&lt;TaskSummary&gt; getTasksAssignedAsPotentialOwnerByStatus(String userId, List&lt;Status&gt; status, String language) of LocalTaskService .</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>That calls <span style="text-decoration: underline;">JPA named query</span> <strong>TasksAssignedAsPotentialOwnerByStatus </strong>included in Taskorm.xml file.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>For parameter 'status' (a list is expected), I'm passing <span style="text-decoration: underline;">an ArrayList of size 1 with org.jbpm.task.Status.Ready enum value in it</span>.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>JPA Query does not retrieve any task while it should.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I've logged generated SQL and when run nativtely on database, it returns records as expected.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>However, the log file shows that the <strong>binding of 'status' list parameter does not serialize correctly</strong>. See log file below in <span style="color: #ff0000;"><strong>red</strong></span>. The status list is binded in binary format !</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Any idea what is wrong ?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Fred</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>JPA query (extract of Taskorm.xml, see status binding variable in <span style="color: #ff0000;">red</span>):</strong></p><p>&lt;/named-query&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;named-query name="TasksAssignedAsPotentialOwnerByStatus"&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;query&gt;</p><p>select</p><p>&#160;&#160;&#160;&#160; new org.jbpm.task.query.TaskSummary(</p><p>&#160;&#160;&#160;&#160; t.id,</p><p>&#160;&#160;&#160;&#160; t.taskData.processInstanceId,</p><p>&#160;&#160;&#160;&#160; name.text,</p><p>&#160;&#160;&#160;&#160; subject.text,</p><p>&#160;&#160;&#160;&#160; description.text,</p><p>&#160;&#160;&#160;&#160; t.taskData.status,</p><p>&#160;&#160;&#160;&#160; t.priority,</p><p>&#160;&#160;&#160;&#160; t.taskData.skipable,</p><p>&#160;&#160;&#160;&#160; actualOwner,</p><p>&#160;&#160;&#160;&#160; createdBy,</p><p>&#160;&#160;&#160;&#160; t.taskData.createdOn,</p><p>&#160;&#160;&#160;&#160; t.taskData.activationTime,</p><p>&#160;&#160;&#160;&#160; t.taskData.expirationTime,</p><p>&#160;&#160;&#160;&#160; t.taskData.processId,</p><p>&#160;&#160;&#160;&#160; t.taskData.processSessionId)</p><p>from</p><p>&#160;&#160;&#160; Task t </p><p>&#160;&#160;&#160; left join t.taskData.createdBy as createdBy</p><p>&#160;&#160;&#160; left join t.taskData.actualOwner as actualOwner</p><p>&#160;&#160;&#160; left join t.subjects as subject</p><p>&#160;&#160;&#160; left join t.descriptions as description</p><p>&#160;&#160;&#160; left join t.names as name,</p><p>&#160;&#160;&#160; OrganizationalEntity potentialOwners</p><p>where</p><p>&#160;&#160;&#160; t.archived = 0 and</p><p>&#160;&#160;&#160; potentialOwners.id = :userId and</p><p>&#160;&#160;&#160; potentialOwners in elements ( t.peopleAssignments.potentialOwners&#160; )&#160; and</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; (</p><p>&#160;&#160;&#160; name.language = :language</p><p>&#160;&#160;&#160; or t.names.size = 0</p><p>&#160;&#160;&#160; ) and</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; (</p><p>&#160;&#160;&#160; subject.language = :language</p><p>&#160;&#160;&#160; or t.subjects.size = 0</p><p>&#160;&#160;&#160; ) and</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; (</p><p>&#160;&#160;&#160; description.language = :language</p><p>&#160;&#160;&#160; or t.descriptions.size = 0</p><p>&#160;&#160;&#160; ) and</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; t.taskData.status in (<span style="color: #ff0000;"><strong>:status</strong></span>) and</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; t.taskData.expirationTime is null</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/query&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>Log file </strong><strong>(see binding of status list variable in <span style="color: #ff0000;">red</span>)</strong><strong>:</strong></p><p>DEBUG 11439685[RMICallHandler-20](Printer.java:106) - listing entities:</p><p>DEBUG 11439685[RMICallHandler-20](Printer.java:113) - org.jbpm.task.User{id=ITCH}</p><p>DEBUG 11439685[RMICallHandler-20](Printer.java:113) - org.jbpm.task.Group{id=SECURITY_GLOBAL}</p><p>DEBUG 11439700[RMICallHandler-20](Printer.java:113) - org.jbpm.task.Group{id=SECURITY_AUTHORITY}</p><p>DEBUG 11439700[RMICallHandler-20](DefaultAutoFlushEventListener.java:76) - Dont need to execute flush</p><p>DEBUG 11439700[RMICallHandler-20](HQLQueryPlan.java:174) - find: select new org.jbpm.task.query.TaskSummary( t.id, t.taskData.processInstanceId, name.text, subject.text, description.text, t.taskData.status, t.priority, t.taskData.skipable, actualOwner, createdBy, t.taskData.createdOn, t.taskData.activationTime, t.taskData.expirationTime, t.taskData.processId, t.taskData.processSessionId) from Task t left join t.taskData.createdBy as createdBy left join t.taskData.actualOwner as actualOwner left join t.subjects as subject left join t.descriptions as description left join t.names as name, OrganizationalEntity potentialOwners where t.archived = 0 and ( potentialOwners.id = :userId or potentialOwners.id in (:groupIds0_, :groupIds1_) ) and potentialOwners in elements ( t.peopleAssignments.potentialOwners ) and ( name.language = :language or t.names.size = 0 ) and ( subject.language = :language or t.subjects.size = 0 ) and ( description.language = :language or t.descriptions.size = 0 ) and t.taskData.status in (:status) and t.taskData.expirationTime is null</p><p>DEBUG 11439732[RMICallHandler-20](SerializationHelper.java:114) - Starting serialization of object [Ready]</p><p>DEBUG 11439732[RMICallHandler-20](QueryParameters.java:278) - named parameters: {userId=ITCH, groupIds1_=SECURITY_AUTHORITY, groupIds0_=SECURITY_GLOBAL, status=2c6d8085fef28094eff2e7aeeae2f0edaef4e1f3ebaed3f4e1f4f5f38080808080808080928080f8f2808eeae1f6e1aeece1eee7aec5eef5ed8080808080808080928080f8f0f48085d2e5e1e4f9, language=en-UK}</p><p>DEBUG 11439732[RMICallHandler-20](QueryTranslatorImpl.java:307) - HQL: select new org.jbpm.task.query.TaskSummary( t.id, t.taskData.processInstanceId, name.text, subject.text, description.text, t.taskData.status, t.priority, t.taskData.skipable, actualOwner, createdBy, t.taskData.createdOn, t.taskData.activationTime, t.taskData.expirationTime, t.taskData.processId, t.taskData.processSessionId) from org.jbpm.task.Task t left join t.taskData.createdBy as createdBy left join t.taskData.actualOwner as actualOwner left join t.subjects as subject left join t.descriptions as description left join t.names as name, org.jbpm.task.OrganizationalEntity potentialOwners where t.archived = 0 and ( potentialOwners.id = :userId or potentialOwners.id in (:groupIds0_, :groupIds1_) ) and potentialOwners in elements ( t.peopleAssignments.potentialOwners ) and ( name.language = :language or t.names.size = 0 ) and ( subject.language = :language or t.subjects.size = 0 ) and ( description.language = :language or t.descriptions.size = 0 ) and t.taskData.status in (:status) and t.taskData.expirationTime is null</p><p>DEBUG 11439747[RMICallHandler-20](QueryTranslatorImpl.java:308) - SQL: select user2_.id as id67_0_, user1_.id as id67_1_, task0_.id as col_0_0_, task0_.processInstanceId as col_1_0_, names5_.text as col_2_0_, subjects3_.text as col_3_0_, descriptio4_.text as col_4_0_, task0_.status as col_5_0_, task0_.priority as col_6_0_, task0_.skipable as col_7_0_, user2_.id as col_8_0_, user1_.id as col_9_0_, task0_.createdOn as col_10_0_, task0_.activationTime as col_11_0_, task0_.expirationTime as col_12_0_, task0_.processId as col_13_0_, task0_.processSessionId as col_14_0_ from Task task0_ left outer join OrganizationalEntity user1_ on task0_.createdBy_id=user1_.id left outer join OrganizationalEntity user2_ on task0_.actualOwner_id=user2_.id left outer join I18NText subjects3_ on task0_.id=subjects3_.Task_Subjects_Id left outer join I18NText descriptio4_ on task0_.id=descriptio4_.Task_Descriptions_Id left outer join I18NText names5_ on task0_.id=names5_.Task_Names_Id, OrganizationalEntity organizati6_ where (task0_.archived=0 )and((organizati6_.id=? )or(organizati6_.id in(? , ?)))and(organizati6_.id in(select potentialo7_.entity_id from PeopleAssignments_PotOwners potentialo7_ where task0_.id=potentialo7_.task_id))and((names5_.language=? )or((select count(names8_.Task_Names_Id) from I18NText names8_ where task0_.id=names8_.Task_Names_Id)=0 ))and((subjects3_.language=? )or((select count(subjects9_.Task_Subjects_Id) from I18NText subjects9_ where task0_.id=subjects9_.Task_Subjects_Id)=0 ))and((descriptio4_.language=? )or((select count(descriptio10_.Task_Descriptions_Id) from I18NText descriptio10_ where task0_.id=descriptio10_.Task_Descriptions_Id)=0 ))and(task0_.status in(?))and(task0_.expirationTime is null )</p><p>DEBUG 11439763[RMICallHandler-20](AbstractBatcher.java:410) - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)</p><p>DEBUG 11439763[RMICallHandler-20](ConnectionManager.java:444) - opening JDBC connection</p><p>DEBUG 11439763[RMICallHandler-20](SQLStatementLogger.java:111) - select user2_.id as id67_0_, user1_.id as id67_1_, task0_.id as col_0_0_, task0_.processInstanceId as col_1_0_, names5_.text as col_2_0_, subjects3_.text as col_3_0_, descriptio4_.text as col_4_0_, task0_.status as col_5_0_, task0_.priority as col_6_0_, task0_.skipable as col_7_0_, user2_.id as col_8_0_, user1_.id as col_9_0_, task0_.createdOn as col_10_0_, task0_.activationTime as col_11_0_, task0_.expirationTime as col_12_0_, task0_.processId as col_13_0_, task0_.processSessionId as col_14_0_ from Task task0_ left outer join OrganizationalEntity user1_ on task0_.createdBy_id=user1_.id left outer join OrganizationalEntity user2_ on task0_.actualOwner_id=user2_.id left outer join I18NText subjects3_ on task0_.id=subjects3_.Task_Subjects_Id left outer join I18NText descriptio4_ on task0_.id=descriptio4_.Task_Descriptions_Id left outer join I18NText names5_ on task0_.id=names5_.Task_Names_Id, OrganizationalEntity organizati6_ where (task0_.archived=0 )and((organizati6_.id=? )or(organizati6_.id in(? , ?)))and(organizati6_.id in(select potentialo7_.entity_id from PeopleAssignments_PotOwners potentialo7_ where task0_.id=potentialo7_.task_id))and((names5_.language=? )or((select count(names8_.Task_Names_Id) from I18NText names8_ where task0_.id=names8_.Task_Names_Id)=0 ))and((subjects3_.language=? )or((select count(subjects9_.Task_Subjects_Id) from I18NText subjects9_ where task0_.id=subjects9_.Task_Subjects_Id)=0 ))and((descriptio4_.language=? )or((select count(descriptio10_.Task_Descriptions_Id) from I18NText descriptio10_ where task0_.id=descriptio10_.Task_Descriptions_Id)=0 ))and(task0_.status in(?))and(task0_.expirationTime is null )</p><p>13/01/16 19:00:57 Hibernate: select user2_.id as id67_0_, user1_.id as id67_1_, task0_.id as col_0_0_, task0_.processInstanceId as col_1_0_, names5_.text as col_2_0_, subjects3_.text as col_3_0_, descriptio4_.text as col_4_0_, task0_.status as col_5_0_, task0_.priority as col_6_0_, task0_.skipable as col_7_0_, user2_.id as col_8_0_, user1_.id as col_9_0_, task0_.createdOn as col_10_0_, task0_.activationTime as col_11_0_, task0_.expirationTime as col_12_0_, task0_.processId as col_13_0_, task0_.processSessionId as col_14_0_ from Task task0_ left outer join OrganizationalEntity user1_ on task0_.createdBy_id=user1_.id left outer join OrganizationalEntity user2_ on task0_.actualOwner_id=user2_.id left outer join I18NText subjects3_ on task0_.id=subjects3_.Task_Subjects_Id left outer join I18NText descriptio4_ on task0_.id=descriptio4_.Task_Descriptions_Id left outer join I18NText names5_ on task0_.id=names5_.Task_Names_Id, OrganizationalEntity organizati6_ where (task0_.archived=0 )and((organizati6_.id=? )or(organizati6_.id in(? , ?)))and(organizati6_.id in(select potentialo7_.entity_id from PeopleAssignments_PotOwners potentialo7_ where task0_.id=potentialo7_.task_id))and((names5_.language=? )or((select count(names8_.Task_Names_Id) from I18NText names8_ where task0_.id=names8_.Task_Names_Id)=0 ))and((subjects3_.language=? )or((select count(subjects9_.Task_Subjects_Id) from I18NText subjects9_ where task0_.id=subjects9_.Task_Subjects_Id)=0 ))and((descriptio4_.language=? )or((select count(descriptio10_.Task_Descriptions_Id) from I18NText descriptio10_ where task0_.id=descriptio10_.Task_Descriptions_Id)=0 ))and(task0_.status in(?))and(task0_.expirationTime is null )</p><p>DEBUG 11439778[RMICallHandler-20](AbstractBatcher.java:513) - preparing statement</p><p>DEBUG 11439794[RMICallHandler-20](Loader.java:1772) - bindNamedParameters() SECURITY_AUTHORITY -&gt; groupIds1_ [3]</p><p>DEBUG 11439794[RMICallHandler-20](NullableType.java:151) - binding 'SECURITY_AUTHORITY' to parameter: 3</p><p>DEBUG 11439794[RMICallHandler-20](Loader.java:1772) - bindNamedParameters() ITCH -&gt; userId [1]</p><p>DEBUG 11439794[RMICallHandler-20](NullableType.java:151) - binding 'ITCH' to parameter: 1</p><p>DEBUG 11439810[RMICallHandler-20](Loader.java:1772) - bindNamedParameters() SECURITY_GLOBAL -&gt; groupIds0_ [2]</p><p>DEBUG 11439810[RMICallHandler-20](NullableType.java:151) - binding 'SECURITY_GLOBAL' to parameter: 2</p><p><span style="color: #ff0000;"><strong>DEBUG 11439810[RMICallHandler-20](Loader.java:1772) - bindNamedParameters() Ready -&gt; status [7]</strong></span></p><p><span style="color: #ff0000;"><strong>DEBUG 11439825[RMICallHandler-20](SerializationHelper.java:114) -</strong> <strong>Starting serialization of object [Ready]</strong></span></p><p><span style="color: #ff0000;"><strong>DEBUG 11439825[RMICallHandler-20](NullableType.java:151) - binding <span style="color: #ff9900;">'2c6d8085fef28094eff2e7aeeae2f0edaef4e1f3ebaed3f4e1f4f5f38080808080808080928080f8f2808eeae1f6e1aeece1eee7aec5eef5ed8080808080808080928080f8f0f48085d2e5e1e4f9'</span> to parameter: 7</strong></span></p><p><span style="color: #ff0000;"><strong>DEBUG 11439841[RMICallHandler-20](SerializationHelper.java:114) - Starting serialization of object [Ready]</strong></span></p><p>DEBUG 11439841[RMICallHandler-20](Loader.java:1772) - bindNamedParameters() en-UK -&gt; language [4]</p><p>DEBUG 11439841[RMICallHandler-20](NullableType.java:151) - binding 'en-UK' to parameter: 4</p><p>DEBUG 11439857[RMICallHandler-20](Loader.java:1772) - bindNamedParameters() en-UK -&gt; language [5]</p><p>DEBUG 11439857[RMICallHandler-20](NullableType.java:151) - binding 'en-UK' to parameter: 5</p><p>DEBUG 11439857[RMICallHandler-20](Loader.java:1772) - bindNamedParameters() en-UK -&gt; language [6]</p><p>DEBUG 11439872[RMICallHandler-20](NullableType.java:151) - binding 'en-UK' to parameter: 6</p><p>DEBUG 11439950[RMICallHandler-20](AbstractBatcher.java:426) - about to open ResultSet (open ResultSets: 0, globally: 0)</p><p>DEBUG 11439966[RMICallHandler-20](Loader.java:717) - processing result set</p><p>DEBUG 11439966[RMICallHandler-20](Loader.java:744) - done processing result set (0 rows)</p><p>DEBUG 11439966[RMICallHandler-20](AbstractBatcher.java:433) - about to close ResultSet (open ResultSets: 1, globally: 1)</p><p>DEBUG 11439981[RMICallHandler-20](AbstractBatcher.java:418) - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)</p><p>DEBUG 11439981[RMICallHandler-20](AbstractBatcher.java:562) - closing statement</p><p>DEBUG 11439981[RMICallHandler-20](ConnectionManager.java:427) - aggressively releasing JDBC connection</p><p>DEBUG 11439997[RMICallHandler-20](ConnectionManager.java:464) - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]</p><p>DEBUG 11439997[RMICallHandler-20](Loader.java:874) - total objects hydrated: 0</p><p>DEBUG 11439997[RMICallHandler-20](StatefulPersistenceContext.java:860) - initializing non-lazy collections</p><p>DEBUG 11440013[RMICallHandler-20](AbstractPlatformTransactionManager.java:922) - Triggering beforeCommit synchronization</p><p>DEBUG 11440013[RMICallHandler-20](AbstractPlatformTransactionManager.java:935) - Triggering beforeCompletion synchronization</p><p>DEBUG 11440013[RMICallHandler-20](AbstractPlatformTransactionManager.java:948) - Triggering afterCommit synchronization</p><p>DEBUG 11440028[RMICallHandler-20](TransactionSynchronizationManager.java:331) - Clearing transaction synchronization</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>persistence.xml:</strong></p><p>&lt;persistence-unit name="org.jbpm.persistence.jta" transaction-type="JTA"&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;jta-data-source&gt;jdbc/HUITDS&lt;/jta-data-source&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!-- Use this if you are using JPA1 / Hibernate3 --&gt; </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;mapping-file&gt;META-INF/JBPMorm.xml&lt;/mapping-file&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;mapping-file&gt;META-INF/ProcessInstanceInfo.hbm.xml&lt;/mapping-file&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!-- Use this if you are using JPA2 / Hibernate4 --&gt; </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!--mapping-file&gt;META-INF/JBPMorm-JPA2.xml&lt;/mapping-file--&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;mapping-file&gt;META-INF/Taskorm.xml&lt;/mapping-file&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!-- JBPM classes --&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.drools.persistence.info.SessionInfo&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.persistence.processinstance.ProcessInstanceInfo&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.drools.persistence.info.WorkItemInfo&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.process.audit.ProcessInstanceLog&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.process.audit.NodeInstanceLog&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.process.audit.VariableInstanceLog&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!--&#160; HumanTask classes --&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.Attachment&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.Content&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.BooleanExpression&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.Comment&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.Deadline&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.Comment&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.Deadline&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.Delegation&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.Escalation&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.Group&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.I18NText&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.Notification&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.EmailNotification&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.EmailNotificationHeader&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.PeopleAssignments&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.Reassignment&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.Status&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.Task&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.TaskData&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.SubTasksStrategy&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.OnParentAbortAllSubTasksEndStrategy&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.OnAllSubTasksEndParentEndStrategy&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;class&gt;org.jbpm.task.User&lt;/class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;properties&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="hibernate.max_fetch_depth" value="3"/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!-- Do not allow DDL statement at deployment time --&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!-- </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="hibernate.hbm2ddl.auto" value="update"/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; --&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!--&#160; Show/hide SQL statement at runtime --&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!-- </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="hibernate.show_sql" value="false"/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; --&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="hibernate.show_sql" value="true"/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!--&#160; Set Oracle dialect for hibernate --&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!-- </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; --&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #ff0000;"><strong>&lt;property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/&gt;</strong></span></p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!--&#160; Use OC4J transaction manager --&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!-- </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.BTMTransactionManagerLookup" /&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; --&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.OC4JTransactionManagerLookup" /&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!-- Toplink-related setting: needed since the problem revolved around a conflicting versions of antlr.jar. </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Hibernate&#160; depends uses version of antlr.jar (antlr 2.7.6 I believe) and Oracle Application Server (OC4J) </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; has a conflicting version of antlr.jar enabled by default in its TopLink library for object-relational mapping</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; --&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="hibernate.query.factory_class" value="org.hibernate.hql.classic.ClassicQueryTranslatorFactory" /&gt; </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/properties&gt;</p><p>&#160;&#160;&#160; </p><p>&#160;&#160;&#160; &lt;/persistence-unit&gt;</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/792549#792549">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>