JBoss Community

Re: JBPM and WebLogic - someone with success?

created by Thomas Nakken in jBPM - View the full discussion

was hitting return before the post was finished..

 

code to setup task server:

 

    EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.drools.task");

    Environment env = KnowledgeBaseFactory.newEnvironment();

    env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);

       SystemEventListener systemEventListener = SystemEventListenerFactory.getSystemEventListener();

     TaskService taskService = new TaskService(emf, systemEventListener);

     TaskServiceSession taskSession = taskService.createSession();

    Group group = new Group("saksbehandler");

     taskSession.addGroup(group);

    for (String user : usersToAdd)

    {

       ttlog.logDebug("Adding user......:" + user);

      taskSession.addUser(new User(user));

      ttlog.logDebug("User added:" + user);

    }

    ttlog.logDebug("Starting MinaTaskServer...");

    MinaTaskServer server = new MinaTaskServer(taskService);

    Thread thread = new Thread(server);

    thread.start();

  

    try

    {

    

      Thread.sleep(1000);

      //taskSession.dispose();

    }

     catch (Exception e)

    {

      ttlog.logApplicationWarning("Unable to sleep (wait) when setting up TaskServer", e);

    }

    ttlog.logDebug("Started MinaTaskServer!");

   }

 

code to get tasks:

BlockingTaskSummaryResponseHandler summaryHandler = new BlockingTaskSummaryResponseHandler();

      client.getTasksAssignedAsPotentialOwner(user, "en-UK", summaryHandler);

      List<TaskSummary> tasks = summaryHandler.getResults();

 

     

 

 

Error messeage when running code to get active tasks (when seleting in orcle db we find the tasks..)

 

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)

Reply to this message by going to Community

Start a new discussion in jBPM at Community