Wicket
  1. Wicket
  2. WICKET-4895

WicketRuntimeException: addOrReplace for feedback panel does not clear Component.FEEDBACK_LIST - feedback from replaced component causes error.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.3.0
    • Fix Version/s: 6.4.0, 1.5.10
    • Component/s: wicket
    • Labels:
      None
    • Environment:
      Wicket 6.3.0

      Description

      Refresh for page, containing feedback panel causes WicketRuntimeException.

      I have MarkupContainer wich has overriden
      protected void onBeforeRender()
      where I call addOrReplace to add or replace component with feedback panel.

      I have noticed that refreshing such page causes
      Caused by: java.lang.RuntimeException: An error occurred while getting the model object for Component: [MessageListView [Component id = messages, page = <No Page>, ...

      During dubug Wicket 6.3.0 I see that
      Component.beforeRender() method has multiple feedbacks in getRequestCycle().getMetaData(FEEDBACK_LIST)
      insteas of one - witch I've replaced in MarkupContainer.onBeforeRender().

      Call to
      oldFeedBack.prepareForRender();
      before addOrReplace fixes problem, but prepareForRender is not in public API.

      StackTrace:
      org.apache.wicket.WicketRuntimeException: Error attaching this container for rendering: [Component id = feedbackPanel]
      at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1692)
      at org.apache.wicket.Component.onBeforeRender(Component.java:3830)
      at org.apache.wicket.Component.internalBeforeRender(Component.java:922)
      at org.apache.wicket.Component.internalPrepareForRender(Component.java:2222)
      at org.apache.wicket.Page.internalPrepareForRender(Page.java:247)
      at org.apache.wicket.Component.render(Component.java:2289)
      at org.apache.wicket.Page.renderPage(Page.java:1021)
      at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:116)
      at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:196)
      at org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165)
      at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:830)
      at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
      at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:253)
      at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
      at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:281)
      at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
      at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
      <....>
      Caused by: java.lang.RuntimeException: An error occurred while getting the model object for Component: [MessageListView [Component id = messages, page = <No Page> ...
      at org.apache.wicket.Component.getDefaultModelObject(Component.java:1620)
      at org.apache.wicket.markup.html.list.ListView.getModelObject(ListView.java:644)
      at org.apache.wicket.markup.html.panel.FeedbackPanel.getCurrentMessages(FeedbackPanel.java:307)
      at org.apache.wicket.markup.html.panel.FeedbackPanel.anyMessage(FeedbackPanel.java:200)
      at org.apache.wicket.markup.html.panel.FeedbackPanel.anyMessage(FeedbackPanel.java:187)
      at org.apache.wicket.markup.html.panel.FeedbackPanel$1.onConfigure(FeedbackPanel.java:155)
      at org.apache.wicket.Component.configure(Component.java:1028)
      at org.apache.wicket.Component.internalBeforeRender(Component.java:913)
      at org.apache.wicket.Component.beforeRender(Component.java:990)
      at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1680)

      1. quickstart.zip
        20 kB
        Artem Morozov

        Activity

        Artem Morozov created issue -
        Artem Morozov made changes -
        Field Original Value New Value
        Description Refresh for page, containing feedback panel causes NPE.

        I have MarkupContainer wich has overriden
        protected void onBeforeRender()
        where I call addOrReplace to add or replace component with feedback panel.

        I have noticed that refreshing such page causes
        Caused by: java.lang.RuntimeException: An error occurred while getting the model object for Component: [MessageListView [Component id = messages, page = <No Page>, ...

        During dubug Wicket 6.3.0 I see that
        Component.beforeRender() method has multiple feedbacks in getRequestCycle().getMetaData(FEEDBACK_LIST)
        insteas of one - witch I've replaced in MarkupContainer.onBeforeRender().

        Call to
        oldFeedBack.prepareForRender();
        before addOrReplace fixes problem, but prepareForRender is not in public API.
        Refresh for page, containing feedback panel causes NPE.

        I have MarkupContainer wich has overriden
        protected void onBeforeRender()
        where I call addOrReplace to add or replace component with feedback panel.

        I have noticed that refreshing such page causes
        Caused by: java.lang.RuntimeException: An error occurred while getting the model object for Component: [MessageListView [Component id = messages, page = <No Page>, ...

        During dubug Wicket 6.3.0 I see that
        Component.beforeRender() method has multiple feedbacks in getRequestCycle().getMetaData(FEEDBACK_LIST)
        insteas of one - witch I've replaced in MarkupContainer.onBeforeRender().

        Call to
        oldFeedBack.prepareForRender();
        before addOrReplace fixes problem, but prepareForRender is not in public API.

        StackTrace:
        org.apache.wicket.WicketRuntimeException: Error attaching this container for rendering: [Component id = feedbackPanel]
            at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1692)
            at org.apache.wicket.Component.onBeforeRender(Component.java:3830)
            at org.apache.wicket.Component.internalBeforeRender(Component.java:922)
            at org.apache.wicket.Component.internalPrepareForRender(Component.java:2222)
            at org.apache.wicket.Page.internalPrepareForRender(Page.java:247)
            at org.apache.wicket.Component.render(Component.java:2289)
            at org.apache.wicket.Page.renderPage(Page.java:1021)
            at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:116)
            at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:196)
            at org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165)
            at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:830)
            at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
            at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:253)
            at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
            at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:281)
            at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
            at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
        <....>
        Caused by: java.lang.RuntimeException: An error occurred while getting the model object for Component: [MessageListView [Component id = messages, page = <No Page> ...
            at org.apache.wicket.Component.getDefaultModelObject(Component.java:1620)
            at org.apache.wicket.markup.html.list.ListView.getModelObject(ListView.java:644)
            at org.apache.wicket.markup.html.panel.FeedbackPanel.getCurrentMessages(FeedbackPanel.java:307)
            at org.apache.wicket.markup.html.panel.FeedbackPanel.anyMessage(FeedbackPanel.java:200)
            at org.apache.wicket.markup.html.panel.FeedbackPanel.anyMessage(FeedbackPanel.java:187)
            at org.apache.wicket.markup.html.panel.FeedbackPanel$1.onConfigure(FeedbackPanel.java:155)
            at org.apache.wicket.Component.configure(Component.java:1028)
            at org.apache.wicket.Component.internalBeforeRender(Component.java:913)
            at org.apache.wicket.Component.beforeRender(Component.java:990)
            at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1680)
        Artem Morozov made changes -
        Summary NullPE: addOrReplace for feedback panel does not clear Component.FEEDBACK_LIST - feedback from replaced component causes NPE error. WicketRuntimeException: addOrReplace for feedback panel does not clear Component.FEEDBACK_LIST - feedback from replaced component causes NPE error.
        Artem Morozov made changes -
        Summary WicketRuntimeException: addOrReplace for feedback panel does not clear Component.FEEDBACK_LIST - feedback from replaced component causes NPE error. WicketRuntimeException: addOrReplace for feedback panel does not clear Component.FEEDBACK_LIST - feedback from replaced component causes error.
        Artem Morozov made changes -
        Description Refresh for page, containing feedback panel causes NPE.

        I have MarkupContainer wich has overriden
        protected void onBeforeRender()
        where I call addOrReplace to add or replace component with feedback panel.

        I have noticed that refreshing such page causes
        Caused by: java.lang.RuntimeException: An error occurred while getting the model object for Component: [MessageListView [Component id = messages, page = <No Page>, ...

        During dubug Wicket 6.3.0 I see that
        Component.beforeRender() method has multiple feedbacks in getRequestCycle().getMetaData(FEEDBACK_LIST)
        insteas of one - witch I've replaced in MarkupContainer.onBeforeRender().

        Call to
        oldFeedBack.prepareForRender();
        before addOrReplace fixes problem, but prepareForRender is not in public API.

        StackTrace:
        org.apache.wicket.WicketRuntimeException: Error attaching this container for rendering: [Component id = feedbackPanel]
            at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1692)
            at org.apache.wicket.Component.onBeforeRender(Component.java:3830)
            at org.apache.wicket.Component.internalBeforeRender(Component.java:922)
            at org.apache.wicket.Component.internalPrepareForRender(Component.java:2222)
            at org.apache.wicket.Page.internalPrepareForRender(Page.java:247)
            at org.apache.wicket.Component.render(Component.java:2289)
            at org.apache.wicket.Page.renderPage(Page.java:1021)
            at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:116)
            at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:196)
            at org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165)
            at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:830)
            at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
            at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:253)
            at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
            at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:281)
            at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
            at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
        <....>
        Caused by: java.lang.RuntimeException: An error occurred while getting the model object for Component: [MessageListView [Component id = messages, page = <No Page> ...
            at org.apache.wicket.Component.getDefaultModelObject(Component.java:1620)
            at org.apache.wicket.markup.html.list.ListView.getModelObject(ListView.java:644)
            at org.apache.wicket.markup.html.panel.FeedbackPanel.getCurrentMessages(FeedbackPanel.java:307)
            at org.apache.wicket.markup.html.panel.FeedbackPanel.anyMessage(FeedbackPanel.java:200)
            at org.apache.wicket.markup.html.panel.FeedbackPanel.anyMessage(FeedbackPanel.java:187)
            at org.apache.wicket.markup.html.panel.FeedbackPanel$1.onConfigure(FeedbackPanel.java:155)
            at org.apache.wicket.Component.configure(Component.java:1028)
            at org.apache.wicket.Component.internalBeforeRender(Component.java:913)
            at org.apache.wicket.Component.beforeRender(Component.java:990)
            at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1680)
        Refresh for page, containing feedback panel causes WicketRuntimeException.

        I have MarkupContainer wich has overriden
        protected void onBeforeRender()
        where I call addOrReplace to add or replace component with feedback panel.

        I have noticed that refreshing such page causes
        Caused by: java.lang.RuntimeException: An error occurred while getting the model object for Component: [MessageListView [Component id = messages, page = <No Page>, ...

        During dubug Wicket 6.3.0 I see that
        Component.beforeRender() method has multiple feedbacks in getRequestCycle().getMetaData(FEEDBACK_LIST)
        insteas of one - witch I've replaced in MarkupContainer.onBeforeRender().

        Call to
        oldFeedBack.prepareForRender();
        before addOrReplace fixes problem, but prepareForRender is not in public API.

        StackTrace:
        org.apache.wicket.WicketRuntimeException: Error attaching this container for rendering: [Component id = feedbackPanel]
            at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1692)
            at org.apache.wicket.Component.onBeforeRender(Component.java:3830)
            at org.apache.wicket.Component.internalBeforeRender(Component.java:922)
            at org.apache.wicket.Component.internalPrepareForRender(Component.java:2222)
            at org.apache.wicket.Page.internalPrepareForRender(Page.java:247)
            at org.apache.wicket.Component.render(Component.java:2289)
            at org.apache.wicket.Page.renderPage(Page.java:1021)
            at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:116)
            at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:196)
            at org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165)
            at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:830)
            at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
            at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:253)
            at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
            at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:281)
            at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
            at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
        <....>
        Caused by: java.lang.RuntimeException: An error occurred while getting the model object for Component: [MessageListView [Component id = messages, page = <No Page> ...
            at org.apache.wicket.Component.getDefaultModelObject(Component.java:1620)
            at org.apache.wicket.markup.html.list.ListView.getModelObject(ListView.java:644)
            at org.apache.wicket.markup.html.panel.FeedbackPanel.getCurrentMessages(FeedbackPanel.java:307)
            at org.apache.wicket.markup.html.panel.FeedbackPanel.anyMessage(FeedbackPanel.java:200)
            at org.apache.wicket.markup.html.panel.FeedbackPanel.anyMessage(FeedbackPanel.java:187)
            at org.apache.wicket.markup.html.panel.FeedbackPanel$1.onConfigure(FeedbackPanel.java:155)
            at org.apache.wicket.Component.configure(Component.java:1028)
            at org.apache.wicket.Component.internalBeforeRender(Component.java:913)
            at org.apache.wicket.Component.beforeRender(Component.java:990)
            at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1680)
        Martin Grigorov made changes -
        Priority Critical [ 2 ] Major [ 3 ]
        Martin Grigorov made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Cannot Reproduce [ 5 ]
        Artem Morozov made changes -
        Attachment quickstart.zip [ 12555359 ]
        Martin Grigorov made changes -
        Resolution Cannot Reproduce [ 5 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Martin Grigorov made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Assignee Martin Grigorov [ mgrigorov ]
        Fix Version/s 6.4.0 [ 12323450 ]
        Fix Version/s 1.5.10 [ 12323510 ]
        Resolution Fixed [ 1 ]
        Artem Morozov made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Artem Morozov
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development