Topic
  • 4 replies
  • Latest Post - ‏2013-03-17T01:28:28Z by kolban
SystemAdmin
SystemAdmin
7615 Posts

Pinned topic Nested services inside human services

‏2013-01-31T13:07:35Z |
Hello,

In BPM 8.0.1, I am working on a coach and I call many nested services during some steps. I would like to consolidate some consequent service calls inside a single General System Service. Everything works fine if I do not put my service calls inside the new service. But when I do the same exact steps inside the new service, all I get is a null pointer exception popup and the server log prints:


[1/31/13 14:51:17:308 EET] 00000eae CoachDataBind W   Coach context was not found 

for coach NG with id: Component.CoachNG.ecc6ae00-7e5a-4c41-a68f-64f3785a4616 [1/31/13 14:51:21:459 EET] 000000d1 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:1111) at com.lombardisoftware.server.ejb.workflow.EJBWorkflowManagerBean.resumeProcess(EJBWorkflowManagerBean.java:392) 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:778) at com.lombardisoftware.component.common.web.WebWorkflowManager.processScreen(WebWorkflowManager.java:737) at com.lombardisoftware.component.common.web.WebWorkflowManager.processRequest(WebWorkflowManager.java:301) at com.lombardisoftware.servlet.AjaxControllerServlet.doPost(AjaxControllerServlet.java:128) 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:34) 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:54) 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.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1784) 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:1690) Caused by: java.lang.NullPointerException at com.lombardisoftware.component.coachng.worker.CoachNGDataJSONHelper.JSONArrayToTWObject(CoachNGDataJSONHelper.java:274) at com.lombardisoftware.component.coachng.worker.CoachNGDataJSONHelper.JSONArrayToTWObject(CoachNGDataJSONHelper.java:249) at com.lombardisoftware.component.coachng.worker.CoachNGDataJSONHelper.JSONObjectToTWObject(CoachNGDataJSONHelper.java:175) at com.lombardisoftware.component.coachng.worker.CoachNGDataJSONHelper.JSONToTWObject(CoachNGDataJSONHelper.java:244) at com.lombardisoftware.component.coachng.worker.CoachNGDataJSONHelper.JSONToTWObject(CoachNGDataJSONHelper.java:219) at com.lombardisoftware.component.coachng.worker.CoachNGDataJSONHelper.JSONObjectToTWObject(CoachNGDataJSONHelper.java:194) at com.lombardisoftware.component.coachng.worker.CoachNGDataJSONHelper.updateCoachData(CoachNGDataJSONHelper.java:116) at com.lombardisoftware.component.coachng.worker.CoachNGDataJSONHelper.updateCoachData(CoachNGDataJSONHelper.java:41) at com.lombardisoftware.component.coachng.worker.CoachNGWorker.doJobProcessWebData(CoachNGWorker.java:203) at com.lombardisoftware.component.common.worker.WebWorker.doJob(WebWorker.java:73) at com.lombardisoftware.component.common.workflow.ExecutionJob.doJob(ExecutionJob.java:409) ... 59 more   [1/31/13 14:51:21:460 EET] 000000d1 wle           E   CWLLG1338E: An error occurred 

while running a service. ExecutionContext: ExecutionStack(ExecutionJob(worker(com.lombardisoftware.component.coachng.worker.CoachNGWorker@500e12ea), processItemId = ProcessItem.314efaa0-8215-41fb-be03-2d51d001ef4a, processTiming = N, saveExecutionContextBehaviour = EXECUTION_CONTEXT_SAVE)), SymbolTable(SymbolTable(...)), sharedData = 

null [1/31/13 14:51:21:696 EET] 00001a42 wle_servlet   W com.lombardisoftware.servlet.ClearThreadCachesFilter doFilter SRVE0190E: File not found: /html/html/common/tw.css


Strange thing is that, the service always works at the first run but fails at the second (i.e. when I press the same button in the UI after the first successful run). And the only difference between the two versions is that instead of using the private variable, I pass my object through inputs/outputs of the new service. Any ideas?
Updated on 2013-03-17T01:28:28Z at 2013-03-17T01:28:28Z by kolban
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Nested services inside human services

    ‏2013-01-31T19:30:26Z  
    Are any of the nested services you are calling Human Services? If so then I think you get an error when you put a human service in a General System Service.

    Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Nested services inside human services

    ‏2013-02-01T07:46:08Z  
    Are any of the nested services you are calling Human Services? If so then I think you get an error when you put a human service in a General System Service.

    Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
    Solved the issue by changing a data variable. It seems one of the services inside was setting a not nullable field as null and thus the UI failed to parse the objects.
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Nested services inside human services

    ‏2013-03-16T05:44:30Z  
    Tried multiple things... I have this issues and no good workaround has helped me... ensured that all variables are set to some values...
  • kolban
    kolban
    3316 Posts

    Re: Nested services inside human services

    ‏2013-03-17T01:28:28Z  
    Tried multiple things... I have this issues and no good workaround has helped me... ensured that all variables are set to some values...
    I'd suggest a "divide and conquer" approach. Take a snapshot/backup of your solution and in the service that is failing, remove half the function and test again. If it still fails, repeat again by removing half the function until you find the part which is failing. Repeat this procedure for the half remaining until you find the exact area that the problem occurs. I realize that this is ugly but this may be the only solution. Have you tried to run the service in debug mode to step through it to zero in on what is failing?

    Neil