Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-3462

[demo app] exception with Nth arg trying to obtain previous args

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Resolved
    • 2.0.0-RC1
    • 2.0.0-RC2
    • Core, Viewer Wicket
    • None

    Description

      in the demo app, use Prog Model >  [action section] > validate

      In the middle section, use "selectTvCharactersByTvShowAndSexUsingName" action.

      • enter a TV show for the first param
      • enter a sex for the second param
      • enter a TV character for the 3rd param

      This will trigger an exception (stack trace below) ... the framework expects this to have only a single parameter and passes in the TvCharacter as the first param.

      NB: the same functionality implemented using a Parameters object works fine, and is perhaps the recommended approach.  Even so, in v1 it used to work this way, so we need to preserve this behaviour.

       

      Stack trace:

      • java.lang.IllegalArgumentException
      • expected param type mismatch in public java.lang.String demoapp.dom.progmodel.actions.validate.ActionValidatePage_selectTvCharactersByShowAndSexUsingName.validateTvCharacters(demoapp.dom.progmodel.actions.TvShow,demoapp.dom.progmodel.actions.TvCharacter$Sex,java.util.List) param-type[0]: expected 'demoapp.dom.progmodel.actions.TvShow', got 'java.util.Collections$UnmodifiableRandomAccessList'
      • org.apache.causeway.core.metamodel.commons.CanonicalInvoker#toVerboseException(CanonicalInvoker.java:187)
      • org.apache.causeway.core.metamodel.commons.CanonicalInvoker#lambda$invoke$2(CanonicalInvoker.java:130)
      • org.apache.causeway.commons.functional.ThrowingFunction#apply(ThrowingFunction.java:66)
      • org.apache.causeway.commons.functional.ThrowingFunction#apply(ThrowingFunction.java:54)
      • org.apache.causeway.commons.functional.Try$Failure#mapFailure(Try.java:434)
      • org.apache.causeway.commons.functional.Try$Failure#mapFailure(Try.java:380)
      • org.apache.causeway.core.metamodel.commons.CanonicalInvoker#invoke(CanonicalInvoker.java:130)
      • org.apache.causeway.core.metamodel.commons.CanonicalInvoker#invoke(CanonicalInvoker.java:114)
      • org.apache.causeway.core.metamodel.object.MmInvokeUtils#invoke(MmInvokeUtils.java:111)
      • org.apache.causeway.core.metamodel.object.MmInvokeUtils#invoke(MmInvokeUtils.java:119)
      • org.apache.causeway.core.metamodel.facets.param.validate.method.ActionParameterValidationFacetViaMethod#invalidReason(ActionParameterValidationFacetViaMethod.java:78)
      • org.apache.causeway.core.metamodel.facets.param.validate.ActionParameterValidationFacetAbstract#invalidates(ActionParameterValidationFacetAbstract.java:47)
      • org.apache.causeway.core.metamodel.interactions.InteractionUtils#lambda$isValidResult$5(InteractionUtils.java:76)
      • java.util.stream.ForEachOps$ForEachOp$OfRef#accept(ForEachOps.java:183)
      • java.util.stream.ReferencePipeline$2$1#accept(ReferencePipeline.java:177)
      • java.util.stream.ReferencePipeline$3$1#accept(ReferencePipeline.java:195)
      • java.util.stream.ReferencePipeline$2$1#accept(ReferencePipeline.java:177)
      • java.util.HashMap$ValueSpliterator#forEachRemaining(HashMap.java:1675)
      • java.util.stream.AbstractPipeline#copyInto(AbstractPipeline.java:484)
      • java.util.stream.AbstractPipeline#wrapAndCopyInto(AbstractPipeline.java:474)
      • java.util.stream.ForEachOps$ForEachOp#evaluateSequential(ForEachOps.java:150)
      • java.util.stream.ForEachOps$ForEachOp$OfRef#evaluateSequential(ForEachOps.java:173)
      • java.util.stream.AbstractPipeline#evaluate(AbstractPipeline.java:234)
      • java.util.stream.ReferencePipeline#forEach(ReferencePipeline.java:497)
      • org.apache.causeway.core.metamodel.interactions.InteractionUtils#isValidResult(InteractionUtils.java:75)
      • org.apache.causeway.core.metamodel.interactions.InteractionUtils#isValidResultSet(InteractionUtils.java:91)
      • org.apache.causeway.core.metamodel.specloader.specimpl.ObjectActionDefault#validateArgumentsIndividually(ObjectActionDefault.java:364)
      • org.apache.causeway.core.metamodel.specloader.specimpl.ObjectActionDefault#isArgumentSetValid(ObjectActionDefault.java:328)
      • org.apache.causeway.viewer.commons.model.action.UiActionForm#getValidityConsent(UiActionForm.java:87)
      • org.apache.causeway.viewer.wicket.ui.panels.FormExecutorDefault#lambda$executeAndProcessResults$1(FormExecutorDefault.java:96)
      • org.apache.causeway.commons.functional.Either$Left#fold(Either.java:127)
      • org.apache.causeway.viewer.wicket.ui.panels.FormExecutorDefault#executeAndProcessResults(FormExecutorDefault.java:95)
      • org.apache.causeway.viewer.wicket.ui.panels.PromptFormAbstract#onOkSubmitted(PromptFormAbstract.java:122)
      • org.apache.causeway.viewer.wicket.ui.util.Wkt$5#onSubmit(Wkt.java:326)
      • org.apache.wicket.ajax.markup.html.form.AjaxButton$1#onSubmit(AjaxButton.java:113)
      • org.apache.wicket.ajax.form.AjaxFormSubmitBehavior$AjaxFormSubmitter#onSubmit(AjaxFormSubmitBehavior.java:249)
      • org.apache.wicket.markup.html.form.Form#delegateSubmit(Form.java:1372)
      • org.apache.wicket.markup.html.form.Form#process(Form.java:1034)
      • org.apache.wicket.markup.html.form.Form#onFormSubmitted(Form.java:858)
      • org.apache.wicket.ajax.form.AjaxFormSubmitBehavior#onEvent(AjaxFormSubmitBehavior.java:202)
      • org.apache.wicket.ajax.AjaxEventBehavior#respond(AjaxEventBehavior.java:146)
      • org.apache.wicket.ajax.AbstractDefaultAjaxBehavior#onRequest(AbstractDefaultAjaxBehavior.java:630)
      • org.apache.wicket.core.request.handler.ListenerRequestHandler#internalInvoke(ListenerRequestHandler.java:300)
      • org.apache.wicket.core.request.handler.ListenerRequestHandler#invoke(ListenerRequestHandler.java:274)
      • org.apache.wicket.core.request.handler.ListenerRequestHandler#invokeListener(ListenerRequestHandler.java:222)
      • org.apache.wicket.core.request.handler.ListenerRequestHandler#respond(ListenerRequestHandler.java:202)
      • org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor#respond(RequestCycle.java:910)
      • org.apache.wicket.request.RequestHandlerExecutor#execute(RequestHandlerExecutor.java:63)
      • org.apache.wicket.request.cycle.RequestCycle#execute(RequestCycle.java:294)
      • org.apache.wicket.request.cycle.RequestCycle#processRequest(RequestCycle.java:255)
      • org.apache.wicket.protocol.http.WicketFilter#processRequestCycle(WicketFilter.java:277)
      • org.apache.wicket.protocol.http.WicketFilter#processRequest(WicketFilter.java:208)
      • org.apache.wicket.protocol.http.WicketFilter#doFilter(WicketFilter.java:307)
      • org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:178)
      • org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:153)
      • org.apache.causeway.core.webapp.modules.logonlog.CausewayLogOnExceptionFilter#doFilter(CausewayLogOnExceptionFilter.java:60)
      • org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:178)
      • org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:153)
      • org.springframework.web.filter.FormContentFilter#doFilterInternal(FormContentFilter.java:93)
      • org.springframework.web.filter.OncePerRequestFilter#doFilter(OncePerRequestFilter.java:117)
      • org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:178)
      • org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:153)
      • org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter#doFilterInternal(WebMvcMetricsFilter.java:96)
      • org.springframework.web.filter.OncePerRequestFilter#doFilter(OncePerRequestFilter.java:117)
      • org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:178)
      • org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:153)
      • org.springframework.web.filter.CharacterEncodingFilter#doFilterInternal(CharacterEncodingFilter.java:201)
      • org.springframework.web.filter.OncePerRequestFilter#doFilter(OncePerRequestFilter.java:117)
      • org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:178)
      • org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:153)
      • org.apache.catalina.core.StandardWrapperValve#invoke(StandardWrapperValve.java:167)
      • org.apache.catalina.core.StandardContextValve#invoke(StandardContextValve.java:90)
      • org.apache.catalina.authenticator.AuthenticatorBase#invoke(AuthenticatorBase.java:481)
      • org.apache.catalina.core.StandardHostValve#invoke(StandardHostValve.java:130)
      • org.apache.catalina.valves.ErrorReportValve#invoke(ErrorReportValve.java:93)
      • org.apache.catalina.core.StandardEngineValve#invoke(StandardEngineValve.java:74)
      • org.apache.catalina.connector.CoyoteAdapter#service(CoyoteAdapter.java:343)
      • org.apache.coyote.http11.Http11Processor#service(Http11Processor.java:390)
      • org.apache.coyote.AbstractProcessorLight#process(AbstractProcessorLight.java:63)
      • org.apache.coyote.AbstractProtocol$ConnectionHandler#process(AbstractProtocol.java:926)
      • org.apache.tomcat.util.net.NioEndpoint$SocketProcessor#doRun(NioEndpoint.java:1791)
      • org.apache.tomcat.util.net.SocketProcessorBase#run(SocketProcessorBase.java:52)
      • org.apache.tomcat.util.threads.ThreadPoolExecutor#runWorker(ThreadPoolExecutor.java:1191)
      • org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker#run(ThreadPoolExecutor.java:659)
      • org.apache.tomcat.util.threads.TaskThread$WrappingRunnable#run(TaskThread.java:61)
      • java.lang.Thread#run(Thread.java:829)
      •  
      • Caused by:
      •  
      • java.lang.IllegalArgumentException
      • argument type mismatch
      • jdk.internal.reflect.NativeMethodAccessorImpl#invoke0(NativeMethodAccessorImpl.java:-2)
      • jdk.internal.reflect.NativeMethodAccessorImpl#invoke(NativeMethodAccessorImpl.java:62)
      • jdk.internal.reflect.DelegatingMethodAccessorImpl#invoke(DelegatingMethodAccessorImpl.java:43)
      • java.lang.reflect.Method#invoke(Method.java:566)
      • org.apache.causeway.commons.internal.reflection._Reflect#lambda$invokeMethodOn$11(_Reflect.java:563)
      • org.apache.causeway.commons.functional.Try#call(Try.java:58)
      • org.apache.causeway.commons.internal.reflection._Reflect#invokeMethodOn(_Reflect.java:561)
      • org.apache.causeway.core.metamodel.commons.CanonicalInvoker#invoke(CanonicalInvoker.java:126)
      • org.apache.causeway.core.metamodel.commons.CanonicalInvoker#invoke(CanonicalInvoker.java:114)
      • org.apache.causeway.core.metamodel.object.MmInvokeUtils#invoke(MmInvokeUtils.java:111)
      • org.apache.causeway.core.metamodel.object.MmInvokeUtils#invoke(MmInvokeUtils.java:119)
      • org.apache.causeway.core.metamodel.facets.param.validate.method.ActionParameterValidationFacetViaMethod#invalidReason(ActionParameterValidationFacetViaMethod.java:78)
      • org.apache.causeway.core.metamodel.facets.param.validate.ActionParameterValidationFacetAbstract#invalidates(ActionParameterValidationFacetAbstract.java:47)
      • org.apache.causeway.core.metamodel.interactions.InteractionUtils#lambda$isValidResult$5(InteractionUtils.java:76)
      • java.util.stream.ForEachOps$ForEachOp$OfRef#accept(ForEachOps.java:183)
      • java.util.stream.ReferencePipeline$2$1#accept(ReferencePipeline.java:177)
      • java.util.stream.ReferencePipeline$3$1#accept(ReferencePipeline.java:195)
      • java.util.stream.ReferencePipeline$2$1#accept(ReferencePipeline.java:177)
      • java.util.HashMap$ValueSpliterator#forEachRemaining(HashMap.java:1675)
      • java.util.stream.AbstractPipeline#copyInto(AbstractPipeline.java:484)
      • java.util.stream.AbstractPipeline#wrapAndCopyInto(AbstractPipeline.java:474)
      • java.util.stream.ForEachOps$ForEachOp#evaluateSequential(ForEachOps.java:150)
      • java.util.stream.ForEachOps$ForEachOp$OfRef#evaluateSequential(ForEachOps.java:173)
      • java.util.stream.AbstractPipeline#evaluate(AbstractPipeline.java:234)
      • java.util.stream.ReferencePipeline#forEach(ReferencePipeline.java:497)
      • org.apache.causeway.core.metamodel.interactions.InteractionUtils#isValidResult(InteractionUtils.java:75)
      • org.apache.causeway.core.metamodel.interactions.InteractionUtils#isValidResultSet(InteractionUtils.java:91)
      • org.apache.causeway.core.metamodel.specloader.specimpl.ObjectActionDefault#validateArgumentsIndividually(ObjectActionDefault.java:364)
      • org.apache.causeway.core.metamodel.specloader.specimpl.ObjectActionDefault#isArgumentSetValid(ObjectActionDefault.java:328)
      • org.apache.causeway.viewer.commons.model.action.UiActionForm#getValidityConsent(UiActionForm.java:87)
      • org.apache.causeway.viewer.wicket.ui.panels.FormExecutorDefault#lambda$executeAndProcessResults$1(FormExecutorDefault.java:96)
      • org.apache.causeway.commons.functional.Either$Left#fold(Either.java:127)
      • org.apache.causeway.viewer.wicket.ui.panels.FormExecutorDefault#executeAndProcessResults(FormExecutorDefault.java:95)
      • org.apache.causeway.viewer.wicket.ui.panels.PromptFormAbstract#onOkSubmitted(PromptFormAbstract.java:122)
      • org.apache.causeway.viewer.wicket.ui.util.Wkt$5#onSubmit(Wkt.java:326)
      • org.apache.wicket.ajax.markup.html.form.AjaxButton$1#onSubmit(AjaxButton.java:113)
      • org.apache.wicket.ajax.form.AjaxFormSubmitBehavior$AjaxFormSubmitter#onSubmit(AjaxFormSubmitBehavior.java:249)
      • org.apache.wicket.markup.html.form.Form#delegateSubmit(Form.java:1372)
      • org.apache.wicket.markup.html.form.Form#process(Form.java:1034)
      • org.apache.wicket.markup.html.form.Form#onFormSubmitted(Form.java:858)
      • org.apache.wicket.ajax.form.AjaxFormSubmitBehavior#onEvent(AjaxFormSubmitBehavior.java:202)
      • org.apache.wicket.ajax.AjaxEventBehavior#respond(AjaxEventBehavior.java:146)
      • org.apache.wicket.ajax.AbstractDefaultAjaxBehavior#onRequest(AbstractDefaultAjaxBehavior.java:630)
      • org.apache.wicket.core.request.handler.ListenerRequestHandler#internalInvoke(ListenerRequestHandler.java:300)
      • org.apache.wicket.core.request.handler.ListenerRequestHandler#invoke(ListenerRequestHandler.java:274)
      • org.apache.wicket.core.request.handler.ListenerRequestHandler#invokeListener(ListenerRequestHandler.java:222)
      • org.apache.wicket.core.request.handler.ListenerRequestHandler#respond(ListenerRequestHandler.java:202)
      • org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor#respond(RequestCycle.java:910)
      • org.apache.wicket.request.RequestHandlerExecutor#execute(RequestHandlerExecutor.java:63)
      • org.apache.wicket.request.cycle.RequestCycle#execute(RequestCycle.java:294)
      • org.apache.wicket.request.cycle.RequestCycle#processRequest(RequestCycle.java:255)
      • org.apache.wicket.protocol.http.WicketFilter#processRequestCycle(WicketFilter.java:277)
      • org.apache.wicket.protocol.http.WicketFilter#processRequest(WicketFilter.java:208)
      • org.apache.wicket.protocol.http.WicketFilter#doFilter(WicketFilter.java:307)
      • org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:178)
      • org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:153)
      • org.apache.causeway.core.webapp.modules.logonlog.CausewayLogOnExceptionFilter#doFilter(CausewayLogOnExceptionFilter.java:60)
      • org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:178)
      • org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:153)
      • org.springframework.web.filter.FormContentFilter#doFilterInternal(FormContentFilter.java:93)
      • org.springframework.web.filter.OncePerRequestFilter#doFilter(OncePerRequestFilter.java:117)
      • org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:178)
      • org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:153)
      • org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter#doFilterInternal(WebMvcMetricsFilter.java:96)
      • org.springframework.web.filter.OncePerRequestFilter#doFilter(OncePerRequestFilter.java:117)
      • org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:178)
      • org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:153)
      • org.springframework.web.filter.CharacterEncodingFilter#doFilterInternal(CharacterEncodingFilter.java:201)
      • org.springframework.web.filter.OncePerRequestFilter#doFilter(OncePerRequestFilter.java:117)
      • org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:178)
      • org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:153)
      • org.apache.catalina.core.StandardWrapperValve#invoke(StandardWrapperValve.java:167)
      • org.apache.catalina.core.StandardContextValve#invoke(StandardContextValve.java:90)
      • org.apache.catalina.authenticator.AuthenticatorBase#invoke(AuthenticatorBase.java:481)
      • org.apache.catalina.core.StandardHostValve#invoke(StandardHostValve.java:130)
      • org.apache.catalina.valves.ErrorReportValve#invoke(ErrorReportValve.java:93)
      • org.apache.catalina.core.StandardEngineValve#invoke(StandardEngineValve.java:74)
      • org.apache.catalina.connector.CoyoteAdapter#service(CoyoteAdapter.java:343)
      • org.apache.coyote.http11.Http11Processor#service(Http11Processor.java:390)
      • org.apache.coyote.AbstractProcessorLight#process(AbstractProcessorLight.java:63)
      • org.apache.coyote.AbstractProtocol$ConnectionHandler#process(AbstractProtocol.java:926)
      • org.apache.tomcat.util.net.NioEndpoint$SocketProcessor#doRun(NioEndpoint.java:1791)
      • org.apache.tomcat.util.net.SocketProcessorBase#run(SocketProcessorBase.java:52)
      • org.apache.tomcat.util.threads.ThreadPoolExecutor#runWorker(ThreadPoolExecutor.java:1191)
      • org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker#run(ThreadPoolExecutor.java:659)
      • org.apache.tomcat.util.threads.TaskThread$WrappingRunnable#run(TaskThread.java:61)
      • java.lang.Thread#run(Thread.java:829)

      Attachments

        Activity

          People

            hobrom Andi Huber
            danhaywood Daniel Keir Haywood
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: