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

Investigate why extensions for View Helper Service don't need an interface when running locally

    Details

    • Type: Task Task
    • Status: Open Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 2.5
    • Fix Version/s: 2.6
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
    • Similar issues:
      KULRICE-6542Remove PersonService.updatePersonIfNeccessary and determine if code within needs to go to a helper somewhere
      KULRICE-11602Create extension points to override ExpressionEvaluator
      KULRICE-2758Split KNS services for local vs. embedded
      KULRICE-1355KNS Unit Tests don't all run successfully locally when run as a group
      KULRICE-4622When running with standalone Rice, ImmediateEmailService never runs locally
      KULRICE-3517SOAPServiceDefinition should check that the serviceInterface is an actual interface if it is set
      KULRICE-3428Review all services published from each module and determine which should be exported to the bus under which run modes (local, embedded, remote)
      KULRICE-12876Investigate intermittent unit test failures on 2.5
      KULRICE-4249RoleMemberLookupableHelperServiceImpl assumes Principals and groups in local database
      KULRICE-2423Convert DocumentHeader into an interface and make into an EBO.
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes
    • Story Points:
      13

      Description

      Several issues have surfaced where if you have a Spring hosted service extending ViewHelperService that does not specify a separate interface, then the methods in that extension will be accessible locally but will not be on the server. This sounds like a local configuration issue, which if left alone, could result in other inadvertently bad code going out into the wild.

      One particular case of this was KULRICE-13118 where when we specified LabsTravelAccountLookupableImpl as a Spring service with #getService, we got an error saying it could not find the method allowsMaintenanceNewOrCopyAction which was not specified on the base LookupableImpl. I fixed it by adding the methods to the interface. There was also a similar case in KULRICE-13115, which I solved in the same way. That one is a bit easier to play around with since it doesn't have methods required by KRAD, so it could be used as testing.

      It seems that whenever we load a service through the global resource loader, we get this error but only on the server. I would think this should fail locally since this case is using a proxy and Spring relies on interfaces to create correct proxies.

      KRAD Sample App Labs -> Configuration -> On this page, click Configuration with Spring Service Expression.
      Result: Stacktrace.

      java.lang.RuntimeException: Exception evaluating expression: #view.renderMaintenanceLinks and #ViewHelper.allowsMaintenanceNewOrCopyAction()
      at org.kuali.rice.krad.uif.view.DefaultExpressionEvaluator.evaluateExpression(DefaultExpressionEvaluator.java:437)
      at org.kuali.rice.krad.uif.view.DefaultExpressionEvaluator.evaluatePropertyExpression(DefaultExpressionEvaluator.java:496)
      at org.kuali.rice.krad.uif.view.DefaultExpressionEvaluator.evaluatePropertyExpressions(DefaultExpressionEvaluator.java:714)
      at org.kuali.rice.krad.uif.view.DefaultExpressionEvaluator.evaluateExpressionsOnConfigurable(DefaultExpressionEvaluator.java:410)
      at org.kuali.rice.krad.uif.lifecycle.model.EvaluateExpressionsTask.performLifecycleTask(EvaluateExpressionsTask.java:93)
      at org.kuali.rice.krad.uif.lifecycle.ViewLifecycleTaskBase.run(ViewLifecycleTaskBase.java:68)
      at org.kuali.rice.krad.uif.lifecycle.ViewLifecyclePhaseBase.run(ViewLifecyclePhaseBase.java:173)
      at org.kuali.rice.krad.uif.lifecycle.SynchronousViewLifecycleProcessor.performPhase(SynchronousViewLifecycleProcessor.java:192)
      at org.kuali.rice.krad.uif.lifecycle.ViewLifecycleBuild.runApplyModelPhase(ViewLifecycleBuild.java:189)
      at org.kuali.rice.krad.uif.lifecycle.ViewLifecycleBuild.run(ViewLifecycleBuild.java:69)
      at org.kuali.rice.krad.uif.lifecycle.ViewLifecycle.encapsulateLifecycle(ViewLifecycle.java:138)
      at org.kuali.rice.krad.uif.lifecycle.ViewLifecycle.buildView(ViewLifecycle.java:185)
      at org.kuali.rice.krad.web.service.impl.ModelAndViewServiceImpl.invokeViewLifecycle(ModelAndViewServiceImpl.java:305)
      at org.kuali.rice.krad.web.service.impl.ModelAndViewServiceImpl.prepareView(ModelAndViewServiceImpl.java:263)
      at sun.reflect.GeneratedMethodAccessor755.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:190)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      at net.bull.javamelody.MonitoringSpringInterceptor.invoke(MonitoringSpringInterceptor.java:74)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
      at com.sun.proxy.$Proxy182.prepareView(Unknown Source)
      at org.kuali.rice.krad.web.controller.UifControllerHandlerInterceptor.postHandle(UifControllerHandlerInterceptor.java:188)
      at org.springframework.web.servlet.HandlerExecutionChain.applyPostHandle(HandlerExecutionChain.java:149)
      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:947)
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
      at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
      at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
      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 net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206)
      at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:179)
      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:214)
      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)
      Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1004E:(pos 33): Method call: Method allowsMaintenanceNewOrCopyAction() cannot be found on com.sun.proxy.$Proxy436 type
      at org.springframework.expression.spel.ast.MethodReference.findAccessorForMethod(MethodReference.java:204)
      at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:118)
      at org.springframework.expression.spel.ast.MethodReference.access$000(MethodReference.java:44)
      at org.springframework.expression.spel.ast.MethodReference$MethodValueRef.getValue(MethodReference.java:258)
      at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:84)
      at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:153)
      at org.springframework.expression.spel.ast.OpAnd.getBooleanValue(OpAnd.java:52)
      at org.springframework.expression.spel.ast.OpAnd.getValueInternal(OpAnd.java:47)
      at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:103)
      at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:94)
      at org.kuali.rice.krad.uif.view.DefaultExpressionEvaluator.evaluateExpression(DefaultExpressionEvaluator.java:434)
      ... 80 more
      

        Issue Links

          Activity

          Hide
          Kurt McNew (Inactive) added a comment -

          For a test, I modified ComponentViewHelperServiceImpl to not implement ComponentViewHelperService and removed the override annotations. Ran a clean/install to rebuild the krad sample app war file. I copied the krad-sampleapp war file into a tomcat instance on my local machine and started the tomcat instance manually. The suggest lookup was working correctly. I also tried enabling dev.mode and krad.dev.mode and found the same results. Thanks.

          Show
          Kurt McNew (Inactive) added a comment - For a test, I modified ComponentViewHelperServiceImpl to not implement ComponentViewHelperService and removed the override annotations. Ran a clean/install to rebuild the krad sample app war file. I copied the krad-sampleapp war file into a tomcat instance on my local machine and started the tomcat instance manually. The suggest lookup was working correctly. I also tried enabling dev.mode and krad.dev.mode and found the same results. Thanks.

            People

            • Assignee:
              Unassigned
              Reporter:
              Kristina Taylor (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Structure Helper Panel