<!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 and WebLogic - someone with success?
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/thomastn">Thomas Nakken</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/642338#642338">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>was hitting return before the post was finished..</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>code to setup task server:</p><p class="p1">  </p><p class="p2">    EntityManagerFactory emf = Persistence.<em>createEntityManagerFactory</em>(<span class="s1">"org.drools.task"</span>);</p><p class="p2">    Environment env = KnowledgeBaseFactory.<em>newEnvironment</em>();</p><p class="p2">    env.set(EnvironmentName.<span class="s2"><em>ENTITY_MANAGER_FACTORY</em></span>, emf);</p><p class="p1">       SystemEventListener systemEventListener = SystemEventListenerFactory.<em>getSystemEventListener</em>();</p><p class="p1">     TaskService taskService = <span class="s3"><strong>new</strong></span> TaskService(emf, systemEventListener);</p><p class="p1">     TaskServiceSession taskSession = taskService.createSession();</p><p class="p1">    Group group = <span class="s3"><strong>new</strong></span> Group(<span class="s1">"saksbehandler"</span>);</p><p class="p1">     taskSession.addGroup(group);</p><p class="p2">    <span class="s3"><strong>for</strong></span> (String user : usersToAdd)</p><p class="p2">    {</p><p class="p1">       <span class="s2">ttlog</span>.logDebug(<span class="s1">"Adding user......:"</span> + user);</p><p class="p2">      taskSession.addUser(<span class="s3"><strong>new</strong></span> User(user));</p><p class="p2">      <span class="s2">ttlog</span>.logDebug(<span class="s1">"User added:"</span> + user);</p><p class="p2">    }</p><p class="p1"> <span class="s4">    </span><span class="s2">ttlog</span><span class="s4">.logDebug(</span>"Starting MinaTaskServer..."<span class="s4">);</span></p><p class="p2">    MinaTaskServer server = <span class="s3"><strong>new</strong></span> MinaTaskServer(taskService);</p><p class="p2">    Thread thread = <span class="s3"><strong>new</strong></span> Thread(server);</p><p class="p2">    thread.start();</p><p class="p1">   </p><p class="p2">    <span class="s3"><strong>try</strong></span></p><p class="p2">    {</p><p class="p1">     </p><p class="p2">      Thread.<em>sleep</em>(1000);</p><p class="p4"><span class="s4">      </span>//taskSession.dispose();</p><p class="p2">    }</p><p class="p1">     <span class="s3"><strong>catch</strong></span> (Exception e)</p><p class="p2">    {</p><p class="p3"><span class="s4">      </span><span class="s2">ttlog</span><span class="s4">.logApplicationWarning(</span>"Unable to sleep (wait) when setting up TaskServer"<span class="s4">, e);</span></p><p class="p2">    }</p><p class="p3"><span class="s4">    </span><span class="s2">ttlog</span><span class="s4">.logDebug(</span>"Started MinaTaskServer!"<span class="s4">);</span></p><p class="p1">   }</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>code to get tasks:</p><p class="p1">BlockingTaskSummaryResponseHandler summaryHandler = <span class="s1"><strong>new</strong></span> BlockingTaskSummaryResponseHandler();</p><p class="p1">      client.getTasksAssignedAsPotentialOwner(user, <span class="s2">"en-UK"</span>, summaryHandler);</p><p class="p1">      List<TaskSummary> tasks = summaryHandler.getResults();</p><p class="p2" style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p class="p2">      </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Error messeage when running code to get active tasks (when seleting in orcle db we find the tasks..)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p> Server-side Exception: org.hibernate.exception.GenericJDBCException: could not execute query sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) java.lang.reflect.Constructor.newInstance(Constructor.java:513) org.jbpm.task.service.responsehandlers.AbstractBaseResponseHandler.createSideException(AbstractBaseResponseHandler.java:74) org.jbpm.task.service.responsehandlers.AbstractBlockingResponseHandler.waitTillDone(AbstractBlockingResponseHandler.java:48) org.jbpm.task.service.responsehandlers.BlockingTaskSummaryResponseHandler.getResults(BlockingTaskSummaryResponseHandler.java:38) no.vegvesen.tt.service.jbpm.controller.ProcessController.getAllTasksForUser(ProcessController.java:162) no.vegvesen.tt.service.jbpm.servelt.JbpmTestServlet.getAllTasksForUser(JbpmTestServlet.java:166) no.vegvesen.tt.service.jbpm.servelt.JbpmTestServlet.performTask(JbpmTestServlet.java:274) no.vegvesen.tt.service.jbpm.servelt.JbpmTestServlet.doGet(JbpmTestServlet.java:56) javax.servlet.http.HttpServlet.service(HttpServlet.java:707) javax.servlet.http.HttpServlet.service(HttpServlet.java:820) weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111) java.security.AccessController.doPrivileged(Native Method) oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313) oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413) oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94) oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161) oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71) weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136) weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715) weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681) weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277) weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183) weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454) weblogic.work.ExecuteThread.execute(ExecuteThread.java:207) weblogic.work.ExecuteThread.run(ExecuteThread.java:176) no.vegvesen.tt.service.jbpm.controller.ProcessController.getAllTasksForUser(ProcessController.java:175) no.vegvesen.tt.service.jbpm.servelt.JbpmTestServlet.getAllTasksForUser(JbpmTestServlet.java:166) no.vegvesen.tt.service.jbpm.servelt.JbpmTestServlet.performTask(JbpmTestServlet.java:274) no.vegvesen.tt.service.jbpm.servelt.JbpmTestServlet.doGet(JbpmTestServlet.java:56) javax.servlet.http.HttpServlet.service(HttpServlet.java:707) javax.servlet.http.HttpServlet.service(HttpServlet.java:820) weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111) java.security.AccessController.doPrivileged(Native Method) oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313) oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413) oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94) oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161) oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71) weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136) weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715) weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681) weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277) weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183) weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454) weblogic.work.ExecuteThread.execute(ExecuteThread.java:207) weblogic.work.ExecuteThread.run(ExecuteThread.java:176) </p></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/642338#642338">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>