Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6134

NPE when using ListView with missing markup

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.2.0
    • Fix Version/s: 7.3.0, 8.0.0-M1
    • Component/s: None
    • Labels:
      None

      Description

      Instead of getting the hint that you've added a component and missing the reference in the markup you get an NPE:

      Unexpected RuntimeException
      Last cause: null
      WicketMessage: Error attaching this container for rendering: [Page class = com.mycompany.HomePage, id = 0, render count = 1]
      Stacktrace
      Root cause:
      java.lang.NullPointerException
      at org.apache.wicket.DequeueContext.nextTag(DequeueContext.java:143)
      at org.apache.wicket.DequeueContext.<init>(DequeueContext.java:71)
      at org.apache.wicket.markup.html.list.ListItem.newDequeueContext(ListItem.java:106)
      at org.apache.wicket.MarkupContainer.dequeue(MarkupContainer.java:2029)
      at org.apache.wicket.MarkupContainer.addedComponent(MarkupContainer.java:1049)
      at org.apache.wicket.MarkupContainer.add(MarkupContainer.java:239)
      at org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:519)
      at org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:124)
      at org.apache.wicket.Component.internalBeforeRender(Component.java:949)
      at org.apache.wicket.Component.beforeRender(Component.java:1017)
      at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1866)
      at org.apache.wicket.Component.onBeforeRender(Component.java:3877)
      at org.apache.wicket.Page.onBeforeRender(Page.java:801)
      at org.apache.wicket.Component.internalBeforeRender(Component.java:949)
      at org.apache.wicket.Component.beforeRender(Component.java:1017)
      at org.apache.wicket.Component.internalPrepareForRender(Component.java:2215)
      at org.apache.wicket.Page.internalPrepareForRender(Page.java:242)
      at org.apache.wicket.Component.render(Component.java:2304)
      at org.apache.wicket.Page.renderPage(Page.java:1018)
      at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:124)
      at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:236)
      at org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175)
      at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:895)
      at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
      at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265)
      at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222)
      at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
      at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261)
      at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203)
      at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:284)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      at org.eclipse.jetty.server.Server.handle(Server.java:499)
      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
      at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
      at java.lang.Thread.run(Thread.java:745)
      Complete stack:
      org.apache.wicket.WicketRuntimeException: Error attaching this container for rendering: [Page class = com.mycompany.HomePage, id = 0, render count = 1]
      at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1878)
      at org.apache.wicket.Component.onBeforeRender(Component.java:3877)
      at org.apache.wicket.Page.onBeforeRender(Page.java:801)
      at org.apache.wicket.Component.internalBeforeRender(Component.java:949)
      at org.apache.wicket.Component.beforeRender(Component.java:1017)
      at org.apache.wicket.Component.internalPrepareForRender(Component.java:2215)
      at org.apache.wicket.Page.internalPrepareForRender(Page.java:242)
      at org.apache.wicket.Component.render(Component.java:2304)
      at org.apache.wicket.Page.renderPage(Page.java:1018)
      at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:124)
      at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:236)
      at org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175)
      at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:895)
      at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
      at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265)
      at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222)
      at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
      at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261)

        Attachments

        1. myproject.7z
          20 kB
          Marc G.

          Issue Links

            Activity

              People

              • Assignee:
                bitstorm Andrea Del Bene
                Reporter:
                marc-g Marc G.
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: