<!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="http://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;">
Re: jBPM 5.1, OpenJPA and WebSphere 7
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/trjiii">trjiii</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/631818#631818">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Thanks Mauricio.  Yes I am having some issues.  Some of them I have been able to work around and some have me completely stuck.  </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I broke trying to use OpenJPA this into two parts.  First I tried to get Process Information to persist.  After that I tried to get the Human Tasks to persist.  </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>First, when I tried to get the Process information persisted, I ran into my first problem.  In <span style="font-size: 10pt;"><strong>JpaProcessPersistenceContext.</strong><span style="font-size: 10pt;"><strong>getProcessInstancesWaitingForEvent</strong>, there is a call to the <strong>ProcessInstanceWaitingForEvent </strong>named query.  This named query contains a Hibernate specific keyword in the query itself, "<strong><em>elements</em></strong>".  I went back and look at the ProcessInstanceInfo class and noticed that it has a Hibernate Specific annotation that is being used<strong>(@CollectionOfElements</strong>).  This functionality is not available in JPA 1.0.  In JPA 2.0 , they added a @ElementCollection annotation that is similar but I still do not think JPQL will support the "<strong><em>elements</em></strong>" keyword as it is HQL.  I could work around this issue by changing the named query to just return all the ProcessInstanceInfo objects and loop through them in getProcessInstancesWaitingForEvent and verify whether or not the supplied type is in the eventTypes set and capture the ID in an array list(I would not suggest this for a production environment but it suffices for testing).  Once I did that, recompiled and re-jared everything, the Process information(session, workitem, etc) seem to persist fine.</span></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-size: 10pt;">The next part I tried to tackle was trying to get Human Tasks to work with OpenJPA.  I have run at least two issues when dealing with trying to get Tasks to work with OpenJPA.  </span><span style="font-size: 10pt;">First, some of the classes(don't have the list in front of me) were runtime enhanced and IBM in their infinite wisdom WAS switched off dynamic runtime enhancement by default so the EntityManager wouldn't load. I exploded the JAR and ran the runtime enhancement against the .class files and went to load again.  Now I have run into mapping trouble...I am currently receiving the followin exception when I try to run the application.  It seems to be barfing on the Deadlines property in the Task class.  If you have any ideas I would appreciate the help.  I am currently running inside WAS with Db2 as the database but am trying to reproduce in a standalone application...</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-size: 10pt;">Thanks for any help you can provide!</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-size: 10pt;"><p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">Caused by: <openjpa-1.2.3-SNAPSHOT-r422266:965640 fatal user error> </span><span style="Courier New&quot: ; color: navy; font-size: 10pt; text-decoration: underline; font-family: &quot;">org.apache.openjpa.persistence.ArgumentException</span><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">: You have supplied columns for "org.jbpm.task.Task.deadlines.org.jbpm.task.Deadlines.endDeadlines", but this mapping cannot have columns in this context.</span></p><p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;"><span style="mso-tab-count: 1;">      </span>at org.apache.openjpa.jdbc.meta.MappingInfo.assertNoSchemaComponents(</span><span style="Courier New&quot: ; color: navy; font-size: 10pt; text-decoration: underline; font-family: &quot;">MappingInfo.java:327</span><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">)</span></p><p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;"><span style="mso-tab-count: 1;">      </span>at org.apache.openjpa.jdbc.meta.strats.RelationToManyTableFieldStrategy.map(</span><span style="Courier New&quot: ; color: navy; font-size: 10pt; text-decoration: underline; font-family: &quot;">RelationToManyTableFieldStrategy.java:96</span><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">)</span></p><p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;"><span style="mso-tab-count: 1;">      </span>at org.apache.openjpa.jdbc.meta.strats.RelationCollectionTableFieldStrategy.map(</span><span style="Courier New&quot: ; color: navy; font-size: 10pt; text-decoration: underline; font-family: &quot;">RelationCollectionTableFieldStrategy.java:94</span><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">)</span></p><p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;"><span style="mso-tab-count: 1;">      </span>at org.apache.openjpa.jdbc.meta.FieldMapping.setStrategy(</span><span style="Courier New&quot: ; color: navy; font-size: 10pt; text-decoration: underline; font-family: &quot;">FieldMapping.java:121</span><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">)</span></p><p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;"><span style="mso-tab-count: 1;">      </span>at org.apache.openjpa.jdbc.meta.RuntimeStrategyInstaller.installStrategy(</span><span style="Courier New&quot: ; color: navy; font-size: 10pt; text-decoration: underline; font-family: &quot;">RuntimeStrategyInstaller.java:80</span><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">)</span></p><p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;"><span style="mso-tab-count: 1;">      </span>at org.apache.openjpa.jdbc.meta.FieldMapping.resolveMapping(</span><span style="Courier New&quot: ; color: navy; font-size: 10pt; text-decoration: underline; font-family: &quot;">FieldMapping.java:454</span><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">)</span></p><p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;"><span style="mso-tab-count: 1;">      </span>at org.apache.openjpa.jdbc.meta.FieldMapping.resolve(</span><span style="Courier New&quot: ; color: navy; font-size: 10pt; text-decoration: underline; font-family: &quot;">FieldMapping.java:419</span><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">)</span></p><p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;"><span style="mso-tab-count: 1;">      </span>at org.apache.openjpa.jdbc.meta.ClassMapping.resolveMapping(</span><span style="Courier New&quot: ; color: navy; font-size: 10pt; text-decoration: underline; font-family: &quot;">ClassMapping.java:840</span><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">)</span></p><p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;"><span style="mso-tab-count: 1;">      </span>at org.apache.openjpa.meta.ClassMetaData.resolve(</span><span style="Courier New&quot: ; color: navy; font-size: 10pt; text-decoration: underline; font-family: &quot;">ClassMetaData.java:1647</span><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">)</span></p><p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;"><span style="mso-tab-count: 1;">      </span>at org.apache.openjpa.jdbc.meta.ValueMappingImpl.resolve(</span><span style="Courier New&quot: ; color: navy; font-size: 10pt; text-decoration: underline; font-family: &quot;">ValueMappingImpl.java:474</span><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">)</span></p><p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;"><span style="mso-tab-count: 1;">      </span>at org.apache.openjpa.jdbc.meta.strats.EmbedFieldStrategy.map(</span><span style="Courier New&quot: ; color: navy; font-size: 10pt; text-decoration: underline; font-family: &quot;">EmbedFieldStrategy.java:107</span><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">)</span></p><p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;"><span style="mso-tab-count: 1;">      </span>at org.apache.openjpa.jdbc.meta.FieldMapping.setStrategy(</span><span style="Courier New&quot: ; color: navy; font-size: 10pt; text-decoration: underline; font-family: &quot;">FieldMapping.java:121</span><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">)</span></p><p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;"><span style="mso-tab-count: 1;">      </span>at org.apache.openjpa.jdbc.meta.RuntimeStrategyInstaller.installStrategy(</span><span style="Courier New&quot: ; color: navy; font-size: 10pt; text-decoration: underline; font-family: &quot;">RuntimeStrategyInstaller.java:80</span><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">)</span></p><p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;"><span style="mso-tab-count: 1;">      </span>at org.apache.openjpa.jdbc.meta.FieldMapping.resolveMapping(</span><span style="Courier New&quot: ; color: navy; font-size: 10pt; text-decoration: underline; font-family: &quot;">FieldMapping.java:454</span><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">)</span></p><p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;"><span style="mso-tab-count: 1;">      </span>at org.apache.openjpa.jdbc.meta.FieldMapping.resolve(</span><span style="Courier New&quot: ; color: navy; font-size: 10pt; text-decoration: underline; font-family: &quot;">FieldMapping.java:419</span><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">)</span></p><p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;"><span style="mso-tab-count: 1;">      </span>at org.apache.openjpa.jdbc.meta.ClassMapping.resolveMapping(</span><span style="Courier New&quot: ; color: navy; font-size: 10pt; text-decoration: underline; font-family: &quot;">ClassMapping.java:840</span><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">)</span></p><p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;"><span style="mso-tab-count: 1;">      </span>at org.apache.openjpa.meta.ClassMetaData.resolve(</span><span style="Courier New&quot: ; color: navy; font-size: 10pt; text-decoration: underline; font-family: &quot;">ClassMetaData.java:1647</span><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">)</span></p><p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;"><span style="mso-tab-count: 1;">      </span>at org.apache.openjpa.meta.MetaDataRepository.processBuffer(</span><span style="Courier New&quot: ; color: navy; font-size: 10pt; text-decoration: underline; font-family: &quot;">MetaDataRepository.java:812</span><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">)</span></p><p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;"><span style="mso-tab-count: 1;">      </span>at org.apache.openjpa.meta.MetaDataRepository.resolveMapping(</span><span style="Courier New&quot: ; color: navy; font-size: 10pt; text-decoration: underline; font-family: &quot;">MetaDataRepository.java:772</span><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">)</span></p><p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;"><span style="mso-tab-count: 1;">      </span>at org.apache.openjpa.meta.MetaDataRepository.resolve(</span><span style="Courier New&quot: ; color: navy; font-size: 10pt; text-decoration: underline; font-family: &quot;">MetaDataRepository.java:650</span><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;">)</span></p><p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: 10pt; color: black; font-family: &quot;Courier New&quot;"> </span></p><span style="font-size: 2;"><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p></span></span><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-size: 10pt;"><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><div class="mcePaste" id="_mcePaste" style="left: 0px; position: absolute; top: 0px;"></div></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/631818#631818">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="http://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>