Kuali Rice Development
  1. Kuali Rice Development
  2. KULRICE-7492

Documents that use PeopleFlows throw stack trace on submission.

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.1
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-12227Creat new PeopleFlow Summary - Travel Account Number lookup throws exception
      KULRICE-9683Quartz link in system admin tab throws a stack trace.
      KULRICE-7495Editing any derived role in embedded mode throws stack trace
      KULRICE-8737Send Simple Notification and Send Event Notification throwing stack trace
      KULRICE-12337DocumentSearchGeneratorImpl throws IllegalStateException when document type is not found
      KULRICE-7970PeopleFlow - Stack trace upon adding delegate member
      KULRICE-9005On missing role qualifiers, rice throws stack trace instead of error message.
      KULRICE-10542KRAD document throws null pointer on save
      KULRICE-14150STE on Peopleflow
      KULRICE-12886Attempting to view mockviews with inputfields throws stack trace
    • Rice Module:
      KRMS
    • Application Requirement:
      KC
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required

      Description

      Documents that use PeopleFlows throw the following stack trace on submission. This happens only in embedded and not in bundled mode.

      java.lang.IllegalStateException: Problem running report: Error running simulation for document id 4120
      at org.kuali.rice.kew.routemodule.service.impl.RoutingReportServiceImpl.report(RoutingReportServiceImpl.java:37)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)

      In the logs I see the following trace:

      Caused by: java.lang.NullPointerException
      at org.kuali.kra.proposaldevelopment.service.impl.ProposalDevelopmentRulesEngineExecutorImpl.execute(ProposalDevelopmentRulesEngineExecutorImpl.java:58)
      at org.kuali.rice.kew.impl.support.krms.RulesEngineRouteModule.executeRulesEngine(RulesEngineRouteModule.java:86)
      at org.kuali.rice.kew.impl.support.krms.RulesEngineRouteModule.findActionRequests(RulesEngineRouteModule.java:69)

      On inspecting the RulesEngineRouteModule class, I noticed that in bundled mode, the engine used is ProviderBasedEngine. However in embedded mode, the line 138 KrmsApiServiceLocator.getEngine() returns null.

        Activity

        Hide
        Jeremy Hanson added a comment -

        This is defined in KRMSLocalSpringBeans.xml:

         
          <bean id="rice.krms.engine" class="org.kuali.rice.krms.framework.engine.ProviderBasedEngine">
            <property name="contextProvider" ref="contextProvider"/>
          </bean>
        

        Does this need to be in KRMSEmbeddedSpringBeans.xml instead?

        Show
        Jeremy Hanson added a comment - This is defined in KRMSLocalSpringBeans.xml: <bean id= "rice.krms.engine" class= "org.kuali.rice.krms.framework.engine.ProviderBasedEngine" > <property name= "contextProvider" ref= "contextProvider" /> </bean> Does this need to be in KRMSEmbeddedSpringBeans.xml instead?
        Hide
        Peter Giles (Inactive) added a comment -

        I have a fix locally. Will do some cleanup and commit it tomorrow.

        Show
        Peter Giles (Inactive) added a comment - I have a fix locally. Will do some cleanup and commit it tomorrow.
        Hide
        Peter Giles (Inactive) added a comment - - edited

        The setup of the beans for remote mode seems to be working now. However, KC is having an issue in embedded mode where the ContextDefinition returned by remoted calls to RuleRepositoryService.selectContext(...) has an agendas list containing null entries. We've confirmed through debugging on the Rice server that the service is producing a valid ContextDefinition with agendas intact, so it appears to be a serialization problem during the soap call.

        I've tried to reproduce this both with an integration test and with a Rice sample application connected to a standalone server, but the ContextDefinition.agendas have come back intact for me in all cases. I've asked Gayathri to crank up the logging on org.apache.cxf.interceptor so that we can see from the client's perspective what the inbound XML message looks like.

        Show
        Peter Giles (Inactive) added a comment - - edited The setup of the beans for remote mode seems to be working now. However, KC is having an issue in embedded mode where the ContextDefinition returned by remoted calls to RuleRepositoryService.selectContext(...) has an agendas list containing null entries. We've confirmed through debugging on the Rice server that the service is producing a valid ContextDefinition with agendas intact, so it appears to be a serialization problem during the soap call. I've tried to reproduce this both with an integration test and with a Rice sample application connected to a standalone server, but the ContextDefinition.agendas have come back intact for me in all cases. I've asked Gayathri to crank up the logging on org.apache.cxf.interceptor so that we can see from the client's perspective what the inbound XML message looks like.
        Hide
        Gayathri Athreya added a comment - - edited

        Hello Peter, while debugging this today, I noticed that the agenda becomes null in the AgendaTypeServiceBase. reporitoryToEngineTranslator on line 43 is null because this line KRMSServiceLocatorInternal.getService("repositoryToEngineTranslator");

        seems to return a null service and hence that method returns null at line 46. I do not think we got into this method yesterday. Which would indicate it is not a serialization issue in the SOAP. Right? Please correct me if I am wrong.

        Show
        Gayathri Athreya added a comment - - edited Hello Peter, while debugging this today, I noticed that the agenda becomes null in the AgendaTypeServiceBase. reporitoryToEngineTranslator on line 43 is null because this line KRMSServiceLocatorInternal.getService("repositoryToEngineTranslator"); seems to return a null service and hence that method returns null at line 46. I do not think we got into this method yesterday. Which would indicate it is not a serialization issue in the SOAP. Right? Please correct me if I am wrong.
        Hide
        Peter Giles (Inactive) added a comment - - edited

        That doesn't sound like what we were seeing, but maybe something has changed in your configuration? We were debugging the call from RuleRepositoryContextProvider line 42 into ruleRepositoryService.selectContext() (which is a remote call when KC is running "embedded"), and on the client side we were seeing a ContextDefinition get returned with a null agenda in it. On the server side we were seeing an AgendaDefinition instance in it. At least, that is how I remember it, I could certainly be wrong.

        If you were getting to the point of attempting to translate the agenda then that is progress. The strange thing though about not being able to find the repositoryToEngineTranslator is that the only place that AgendaTypeService.loadAgenda gets called is from RepositoryToEngineTranslator, so you have to have the service implementation to make the call into AgendaTypeServiceBase in the first place. Maybe we can debug this some more today?

        Show
        Peter Giles (Inactive) added a comment - - edited That doesn't sound like what we were seeing, but maybe something has changed in your configuration? We were debugging the call from RuleRepositoryContextProvider line 42 into ruleRepositoryService.selectContext() (which is a remote call when KC is running "embedded"), and on the client side we were seeing a ContextDefinition get returned with a null agenda in it. On the server side we were seeing an AgendaDefinition instance in it. At least, that is how I remember it, I could certainly be wrong. If you were getting to the point of attempting to translate the agenda then that is progress. The strange thing though about not being able to find the repositoryToEngineTranslator is that the only place that AgendaTypeService.loadAgenda gets called is from RepositoryToEngineTranslator, so you have to have the service implementation to make the call into AgendaTypeServiceBase in the first place. Maybe we can debug this some more today?
        Hide
        Peter Giles (Inactive) added a comment -

        We determined that the KRMSServiceLocatorInternal.getService("repositoryToEngineTranslator") call was adding a namespace to the service QName and thereby missing the local bean. That issue has now been fixed.

        Show
        Peter Giles (Inactive) added a comment - We determined that the KRMSServiceLocatorInternal.getService("repositoryToEngineTranslator") call was adding a namespace to the service QName and thereby missing the local bean. That issue has now been fixed.
        Hide
        Gayathri Athreya added a comment -

        All KC documents using PeopleFlows route now. Thanks.

        Show
        Gayathri Athreya added a comment - All KC documents using PeopleFlows route now. Thanks.

          People

          • Assignee:
            Peter Giles (Inactive)
            Reporter:
            Gayathri Athreya
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Structure Helper Panel