Topic
6 replies Latest Post - ‏2013-07-29T20:31:41Z by huangjd
SystemAdmin
SystemAdmin
7615 Posts
ACCEPTED ANSWER

Pinned topic BPM 8 Process Flows works in Debug Service But Run Service

‏2012-10-05T02:05:15Z |
I'm building a BPM 8 process flow using BPM Process Designer. If I click on "Debug Service" from process designer the process runs fine I just have to step through the first interaction. I I click on "Run Service" it get a null pointer exception after the second coach. Here's the stack trace. It doesn't like any of the items I worked on. Any ideas why I can't run the flow in run mode, but in debug mode?
10/4/12 20:53:30:204 CDT 00000056 wle E CWLLG0594E: An exception occurred while initializing the runnable thread. Error: com.lombardisoftware.component.common.workflow.WorkflowProcessItemException: java.lang.NullPointerException
com.lombardisoftware.component.common.workflow.WorkflowProcessItemException: java.lang.NullPointerException
at com.lombardisoftware.component.common.workflow.ExecutionJob.doJob(ExecutionJob.java:421)
at com.lombardisoftware.server.ejb.workflow.EJBWorkflowManagerBean.doResumeWorkflowEngine(EJBWorkflowManagerBean.java:1045)
at com.lombardisoftware.server.ejb.workflow.EJBWorkflowManagerBean.resumeProcess(EJBWorkflowManagerBean.java:382)
at com.lombardisoftware.server.ejb.workflow.EJSRemoteStatefulEJBWorkflowManager_82478d70.resumeProcess(Unknown Source)
at com.lombardisoftware.server.ejb.workflow._EJBWorkflowManagerInterface_Stub.resumeProcess(_EJBWorkflowManagerInterface_Stub.java:518)
at com.lombardisoftware.component.common.workflow.EJBWorkflowManagerDelegateDefault.resumeProcess(EJBWorkflowManagerDelegateDefault.java:142)
at com.lombardisoftware.component.common.workflow.EJBWorkflowManagerDelegateWebSphere$6.run(EJBWorkflowManagerDelegateWebSphere.java:84)
at java.security.AccessController.doPrivileged(AccessController.java:280)
at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper.doAsCurrentSubjectContextSensitive(WebsphereDelegateHelper.java:175)
at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper.doAsCurrentSubjectContextSensitive(WebsphereDelegateHelper.java:159)
at com.lombardisoftware.component.common.workflow.EJBWorkflowManagerDelegateWebSphere.resumeProcess(EJBWorkflowManagerDelegateWebSphere.java:82)
at com.lombardisoftware.component.common.web.WebWorkflowManager.callEJBWorkflowManager(WebWorkflowManager.java:721)
at com.lombardisoftware.component.common.web.WebWorkflowManager.processScreen(WebWorkflowManager.java:680)
at com.lombardisoftware.component.common.web.WebWorkflowManager.processRequest(WebWorkflowManager.java:281)
at com.lombardisoftware.servlet.AjaxControllerServlet.doPost(AjaxControllerServlet.java:129)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1224)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97)
at com.lombardisoftware.servlet.ClearThreadCachesFilter.doFilter(ClearThreadCachesFilter.java:24)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
at com.lombardisoftware.servlet.SetUserTimeZoneFilter.doFilter(SetUserTimeZoneFilter.java:41)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
at com.lombardisoftware.servlet.BidiSupportFilter.doFilter(BidiSupportFilter.java:39)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
at com.lombardisoftware.servlet.CrossSiteScriptingFilter.doFilter(CrossSiteScriptingFilter.java:81)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
at com.lombardisoftware.servlet.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:35)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
at com.lombardisoftware.servlet.CompressionFilter.doFilter(CompressionFilter.java:47)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:928)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1025)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:895)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1659)
Caused by: java.lang.NullPointerException
at com.lombardisoftware.component.coachng.worker.CoachNGDataJSONHelper.JSONObjectToTWObject(CoachNGDataJSONHelper.java:125)
at com.lombardisoftware.component.coachng.worker.CoachNGDataJSONHelper.JSONToTWObject(CoachNGDataJSONHelper.java:199)
at com.lombardisoftware.component.coachng.worker.CoachNGDataJSONHelper.JSONArrayToTWObject(CoachNGDataJSONHelper.java:244)
at com.lombardisoftware.component.coachng.worker.CoachNGDataJSONHelper.JSONArrayToTWObject(CoachNGDataJSONHelper.java:204)
at com.lombardisoftware.component.coachng.worker.CoachNGDataJSONHelper.JSONObjectToTWObject(CoachNGDataJSONHelper.java:130)
at com.lombardisoftware.component.coachng.worker.CoachNGDataJSONHelper.updateCoachData(CoachNGDataJSONHelper.java:78)
at com.lombardisoftware.component.coachng.worker.CoachNGDataJSONHelper.updateCoachData(CoachNGDataJSONHelper.java:35)
at com.lombardisoftware.component.coachng.worker.CoachNGWorker.doJobProcessWebData(CoachNGWorker.java:171)
at com.lombardisoftware.component.common.worker.WebWorker.doJob(WebWorker.java:73)
at com.lombardisoftware.component.common.workflow.ExecutionJob.doJob(ExecutionJob.java:409)
... 58 more
Updated on 2012-10-13T17:39:42Z at 2012-10-13T17:39:42Z by SystemAdmin
  • kolban
    kolban
    3314 Posts
    ACCEPTED ANSWER

    Re: BPM 8 Process Flows works in Debug Service But Run Service

    ‏2012-10-05T23:21:58Z  in response to SystemAdmin
    Scott,
    I too have been bitten by this and I believe that there are a number of PMRs open in this area. The first thing we need to do is drill down in your Coach and find out which field in the coach is the one that is giving us problems. Take a copy of your work and start removing the fields 1 by 1 until it works. When you find the field that when it is present breaks but when it is omitted, the coach works ... post back the exact details of that field. I'd also immediately contact IBM support and create a PMR. If it works in debug (which mine does) and fails when run as a service (which mine also does) then we have a problem. My issue had a different Java Stack Trace signature and was based around dates.

    Neil
    • SystemAdmin
      SystemAdmin
      7615 Posts
      ACCEPTED ANSWER

      Re: BPM 8 Process Flows works in Debug Service But Run Service

      ‏2012-10-13T17:39:42Z  in response to kolban
      Hi Neil,

      Thanks for the advice. I did create a ticket IBM support, and they were very responsive. They got back in less then a few hours. They gave me some patches install. The coaches run better now, but I still have problem with 1 of the 4 coaches I built. Support asked for a snapshot of the BPM process I authored, and steps to reproduce. I told them that the snapshot depends on Java integration service calls. They asked if I could mock the service calls and provide them a new snapshot. I did this, but after I mocked the service calls the problem went away, so there's nothing for them to reproduce. To get around the problem I ended up dividing the coach screen into two. BPM 8.0 seems to run better when there's less views on the screen. I still get an occasional NPE, but not too often.
      • yara.medhat
        yara.medhat
        2 Posts
        ACCEPTED ANSWER

        Re: BPM 8 Process Flows works in Debug Service But Run Service

        ‏2013-05-01T14:51:31Z  in response to SystemAdmin

        Dear Sir,

        May you kindly provide me with the patches as I am facing the same problem?

        Thanks,

        Yara

      • edling
        edling
        256 Posts
        ACCEPTED ANSWER

        Re: BPM 8 Process Flows works in Debug Service But Run Service

        ‏2013-05-02T08:06:34Z  in response to SystemAdmin

        The new coach view are very sensitive to objects that are replaced or not fully initialized, when doing an update/change. When debugging, the coach seems to be reloaded from scratch and thus never has this problem. If you have this NPE problem, try inserting a "Please wait ... loading" coach between the service call and the real coach. Let the help coach have an OK button that you press manually or programmatically after a second. This will force a reload of the main coach and likely workaround the NPE issue.

        My opinion is that this coach view weakness, including the un-sophisticated error handling, is a defect. We have a PMR, but L3 think we should always reuse objects when doing a persist to SOR round-trip and always initialize everything in all objects, regardless of whether a subobject or variable is used or not.

        • yara.medhat
          yara.medhat
          2 Posts
          ACCEPTED ANSWER

          Re: BPM 8 Process Flows works in Debug Service But Run Service

          ‏2013-05-02T10:24:55Z  in response to edling

          To initialize everything in all objects is my current workaround, but was hoping for a permanent fix for this issue.

    • huangjd
      huangjd
      46 Posts
      ACCEPTED ANSWER

      Re: BPM 8 Process Flows works in Debug Service But Run Service

      ‏2013-07-29T20:31:41Z  in response to kolban

      We are getting this error on the assignment or a complex object;

      tw.local.selectedLegalAgreement = tw.local.processData.businessData.legalAgreements[i];

      So the workarounds I hear are:

      1) Reload the coach. (we've been doing this by having a duplicate of the coach and a decision gate to toggle between the two on any boundary event).

      2) Initialize everything in the entire object. I don't know if this works all the time. When we say everything, does that mean all simple and complex types? Strings, Integers, etc... What about lists of complex types? Do we have to create it as a new list or actually create one empty object and insert it into the list.  And I am guessing if there are nested complex objects you'll have to initilize the entire object tree. And do we have to initilize both sides of the assignment?

      Our object it is failing on is fairly complex and large, so initializing it is difficult.

      And the error we're getting is:

      java.lang.NullPointerException        at com.lombardisoftware.component.coachng.worker.CoachNGDataJSONHelper.JSONArrayToTWObject(CoachNGDataJSONHelper.java:288)
      
      Updated on 2013-07-29T20:34:46Z at 2013-07-29T20:34:46Z by huangjd