Uploaded image for project: 'Kuali Rice Development'
  1. Kuali Rice Development
  2. KULRICE-12908

AFT Failure Lookup Search Null Pointer Exception in LookupableImpl.processSearchCriteria

    Details

    • Type: Bug Fix
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.4.2, 2.5
    • Fix Version/s: 2.4.2
    • Component/s: Development, Regression
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Sprint:
      Core 2.5.0-m5 Sprint 1
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required

      Description

      AFT Step: Open /kr-krad/kradsampleapp?viewId=KradSampleAppHome
      AFT Step: Click Lookup Search link.

      DemoLookUpSearchAft.testLookUpSearchNav
      http://ci.rice.kuali.org/view/rice-2.4/job/rice-2.4-smoke-test-krad/lastCompletedBuild/testReport/org.kuali.rice.krad.demo.lookup.search/DemoLookUpSearchAft/testLookUpSearchNav/

      
      
      Incident report class org.kuali.rice.krad.demo.lookup.search.DemoLookUpSearchAft navigating to  : View Id:  Doc Id: 
      StackTrace: java.lang.NullPointerException
      at org.kuali.rice.krad.lookup.LookupableImpl.processSearchCriteria(LookupableImpl.java:202)
      at org.kuali.rice.krad.lookup.LookupableImpl.performSearch(LookupableImpl.java:96)
      at org.kuali.rice.krad.lookup.LookupControllerServiceImpl.search(LookupControllerServiceImpl.java:133)
      at sun.reflect.GeneratedMethodAccessor1402.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      at net.bull.javamelody.MonitoringSpringInterceptor.invoke(MonitoringSpringInterceptor.java:74)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      at com.sun.proxy.$Proxy182.search(Unknown Source)
      at org.kuali.rice.krad.lookup.LookupController.search(LookupController.java:53)
      at org.kuali.rice.krad.lookup.LookupController$$FastClassByCGLIB$$c4222517.invoke(<generated>)
      at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
      at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:698)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
      at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:631)
      at edu.sampleu.travel.DemoLookupController$$EnhancerByCGLIB$$d9d7482e.search(<generated>)
      at sun.reflect.GeneratedMethodAccessor1401.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
      at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
      at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
      at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
      at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
      at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
      at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
      at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.kuali.rice.krad.web.filter.CharsetFilter.doFilter(CharsetFilter.java:58)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.kuali.rice.krad.web.filter.UserLoginFilter.doFilter(UserLoginFilter.java:89)
      at org.kuali.rice.krad.web.filter.UserLoginFilter.doFilter(UserLoginFilter.java:77)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.kuali.rice.krad.web.filter.BootstrapFilterChain.doFilter(BootstrapFilter.java:327)
      at org.kuali.rice.krad.web.filter.DummyLoginFilter.doFilter(DummyLoginFilter.java:82)
      at org.kuali.rice.krad.web.filter.DummyLoginFilter.doFilter(DummyLoginFilter.java:62)
      at org.kuali.rice.krad.web.filter.BootstrapFilterChain.doFilter(BootstrapFilter.java:320)
      at org.kuali.rice.krad.web.filter.BootstrapFilter.doFilter(BootstrapFilter.java:199)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.kuali.rice.krad.web.filter.UifSessionTimeoutFilter.doFilter(UifSessionTimeoutFilter.java:130)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.kuali.rice.core.web.Log4JContextClearingFilter.doFilterInternal(Log4JContextClearingFilter.java:37)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.kuali.rice.krad.web.filter.HideWebInfFilter.doFilter(HideWebInfFilter.java:68)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.springframework.web.filter.AbstractRequestLoggingFilter.doFilterInternal(AbstractRequestLoggingFilter.java:213)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:722)
      
      

      DemoLookUpSearchAft.testLookUpSearchBookmark
      http://ci.rice.kuali.org/view/rice-2.4/job/rice-2.4-smoke-test-krad/lastCompletedBuild/testReport/org.kuali.rice.krad.demo.lookup.search/DemoLookUpSearchAft/testLookUpSearchBookmark/

      DemoTravelAccountLookUpAutoSearchAft.testDemoTravelAccountLookUpAutoSearchNav
      http://ci.rice.kuali.org/view/rice-2.4/job/rice-2.4-smoke-test-krad/lastCompletedBuild/testReport/org.kuali.rice.krad.demo.travel.account/DemoTravelAccountLookUpAutoSearchAft/testDemoTravelAccountLookUpAutoSearchNav/

      DemoTravelAccountLookUpAutoSearchAft.testDemoTravelAccountLookUpAutoSearchBookmark
      http://ci.rice.kuali.org/view/rice-2.4/job/rice-2.4-smoke-test-krad/lastCompletedBuild/testReport/org.kuali.rice.krad.demo.travel.account/DemoTravelAccountLookUpAutoSearchAft/testDemoTravelAccountLookUpAutoSearchBookmark/

      LabsLookupAutomaticPassingOfKeysAft.testLabsLookupAutomaticPassingOfKeysBookmark
      http://ci.rice.kuali.org/view/rice-2.4/job/rice-2.4-smoke-test-krad-labs/lastCompletedBuild/testReport/org.kuali.rice.krad.labs.lookups/LabsLookupAutomaticPassingOfKeysAft/testLabsLookupAutomaticPassingOfKeysBookmark/

      Abbreviated test name: DemoLookUpSearchAft.testHelpBookmark
      Full test name: org.kuali.rice.krad.demo.lookup.search.DemoLookUpSearchAft.testHelpBookmark
      Test results url: http://ci.rice.kuali.org/job/rice-2.5-test-functional-env14-jenkins-krad-sampleapp/lastCompletedBuild/testReport/org.kuali.rice.krad.demo.lookup.search/DemoLookUpSearchAft/testHelpBookmark/

      Abbreviated test name: DemoLookUpSearchAft.testHelpNav
      Full test name: org.kuali.rice.krad.demo.lookup.search.DemoLookUpSearchAft.testHelpNav
      Test results url: http://ci.rice.kuali.org/job/rice-2.5-test-functional-env14-jenkins-krad-sampleapp/lastCompletedBuild/testReport/org.kuali.rice.krad.demo.lookup.search/DemoLookUpSearchAft/testHelpNav/

      Abbreviated test name: DemoTravelAccountLookUpAutoSearchAft.testHelpBookmark
      Full test name: org.kuali.rice.krad.demo.travel.account.DemoTravelAccountLookUpAutoSearchAft.testHelpBookmark
      Test results url: http://ci.rice.kuali.org/job/rice-2.5-test-functional-env14-jenkins-krad-sampleapp/lastCompletedBuild/testReport/org.kuali.rice.krad.demo.travel.account/DemoTravelAccountLookUpAutoSearchAft/testHelpBookmark/

      Abbreviated test name: DemoTravelAccountLookUpAutoSearchAft.testHelpNav
      Full test name: org.kuali.rice.krad.demo.travel.account.DemoTravelAccountLookUpAutoSearchAft.testHelpNav
      Test results url: http://ci.rice.kuali.org/job/rice-2.5-test-functional-env14-jenkins-krad-sampleapp/lastCompletedBuild/testReport/org.kuali.rice.krad.demo.travel.account/DemoTravelAccountLookUpAutoSearchAft/testHelpNav/

      Abbreviated test name: LabsLookupAutomaticPassingOfKeysAft.testLabsLookupAutomaticPassingOfKeysNav
      Full test name: org.kuali.rice.krad.labs.lookups.LabsLookupAutomaticPassingOfKeysAft.testLabsLookupAutomaticPassingOfKeysNav
      Test results url: http://ci.rice.kuali.org/job/rice-2.5-test-functional-env14-jenkins-krad-sampleapp/lastCompletedBuild/testReport/org.kuali.rice.krad.labs.lookups/LabsLookupAutomaticPassingOfKeysAft/testLabsLookupAutomaticPassingOfKeysNav/

        Attachments

          Issue Links

            Activity

            Hide
            cniesen Claus Niesen added a comment -

            FYI: commit to 2.4

            Show
            cniesen Claus Niesen added a comment - FYI: commit to 2.4
            Hide
            cniesen Claus Niesen added a comment -

            Issue caused by KULRICE-12765

            Show
            cniesen Claus Niesen added a comment - Issue caused by KULRICE-12765
            Hide
            cniesen Claus Niesen added a comment -

            The commit 47361 from KULRICE-12910 doesn't really fix the issue but represents a work around in most cases. The fix there is to check if viewPostMetaData is null. Filtering will be skipped if viewPostMetaData is null. This works for regular lookups where the search criteria is first displayed (and viewPostMetaData is created) before executing the search. However, when doing a search directly then the filtering is skipped causing KIM User Control and KIM Group Controls to fail.

            Example:
            This search works because only the actual database field is specified in the search criteria. However the KIM User Control is not populated properly.
            http://localhost:8080/krad-dev/kr-krad/lookup?methodToCall=search&dataObjectClassName=org.kuali.rice.krad.demo.travel.dataobject.TravelAccount&lookupCriteria[foId]=fred

            For proper display of the KIM User Control, the control has additional fields that are not part of persisted record. These since these fields appear in the lookup criteria they need to be filtered out. Since this filtering out has been disabled for searches the following link will cause the original exception of KULRICE-12765.
            http://localhost:8080/krad-dev/kr-krad/lookup?methodToCall=search&dataObjectClassName=org.kuali.rice.krad.demo.travel.dataobject.TravelAccount&lookupCriteria[foId]=fred&lookupCriteria[fiscalOfficer.principalName]=fred&lookupCriteria[fiscalOfficer.name]=fred

            For reference how the KIM User Control is populated (not executing a search right way):
            http://localhost:8080/krad-dev/kr-krad/lookup?methodToCall=start&dataObjectClassName=org.kuali.rice.krad.demo.travel.dataobject.TravelAccount&lookupCriteria[foId]=fred&lookupCriteria[fiscalOfficer.principalName]=fred&lookupCriteria[fiscalOfficer.name]=fred

            Show
            cniesen Claus Niesen added a comment - The commit 47361 from KULRICE-12910 doesn't really fix the issue but represents a work around in most cases. The fix there is to check if viewPostMetaData is null. Filtering will be skipped if viewPostMetaData is null. This works for regular lookups where the search criteria is first displayed (and viewPostMetaData is created) before executing the search. However, when doing a search directly then the filtering is skipped causing KIM User Control and KIM Group Controls to fail. Example: This search works because only the actual database field is specified in the search criteria. However the KIM User Control is not populated properly. http://localhost:8080/krad-dev/kr-krad/lookup?methodToCall=search&dataObjectClassName=org.kuali.rice.krad.demo.travel.dataobject.TravelAccount&lookupCriteria[foId]=fred For proper display of the KIM User Control, the control has additional fields that are not part of persisted record. These since these fields appear in the lookup criteria they need to be filtered out. Since this filtering out has been disabled for searches the following link will cause the original exception of KULRICE-12765 . http://localhost:8080/krad-dev/kr-krad/lookup?methodToCall=search&dataObjectClassName=org.kuali.rice.krad.demo.travel.dataobject.TravelAccount&lookupCriteria[foId]=fred&lookupCriteria[fiscalOfficer.principalName]=fred&lookupCriteria[fiscalOfficer.name]=fred For reference how the KIM User Control is populated (not executing a search right way): http://localhost:8080/krad-dev/kr-krad/lookup?methodToCall=start&dataObjectClassName=org.kuali.rice.krad.demo.travel.dataobject.TravelAccount&lookupCriteria[foId]=fred&lookupCriteria[fiscalOfficer.principalName]=fred&lookupCriteria[fiscalOfficer.name]=fred
            Hide
            cniesen Claus Niesen added a comment -

            We agreed that the case where a direct search with displaying a KIM User/Group Control is desired is unlikely and will not be supported.

            Regular lookups where the criteria is displayed first to the user before doing a search works and direct search where the criteria (i.e. KIM User Control) is not displayed and thus no non-valid criteria are passed works as well.

            This was documented in the relevant JavaDoc.

            Show
            cniesen Claus Niesen added a comment - We agreed that the case where a direct search with displaying a KIM User/Group Control is desired is unlikely and will not be supported. Regular lookups where the criteria is displayed first to the user before doing a search works and direct search where the criteria (i.e. KIM User Control) is not displayed and thus no non-valid criteria are passed works as well. This was documented in the relevant JavaDoc.

              People

              • Assignee:
                cniesen Claus Niesen
                Reporter:
                eghm-kuali-m Erik Meade
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Remaining Estimate - 4 hours
                  4h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified