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

Markup String of IMarkupResourceStreamProvider throws NPE for inherited markup

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.16.0
    • Fix Version/s: 7.0.0-M3, 6.17.0
    • Component/s: wicket
    • Labels:
      None

      Description

      I try to write a page class test. The page implements IMarkupResourceStreamProvider and provides a Markup String.

      Maybe this is caused by my page setup (extension of basic page)

      Stacktrace:
      <pre>
      WARN - RequestCycleExtra - Handling the following exception
      org.apache.wicket.util.resource.StringResourceStream@650908b5:
      <!DOCTYPE html>
      <html xmlns:wicket="http://wicket.apache.org">
      <body>
      <wicket:extend>
      <span wicket:id="plugin">Plugin name</span>
      </wicket:extend>
      </body>
      </html>: Error while reading the markup: null
      MarkupStream: [unknown]
      at org.apache.wicket.markup.MarkupFactory.loadMarkup(MarkupFactory.java:450)
      at org.apache.wicket.markup.MarkupCache.loadMarkup(MarkupCache.java:448)
      at org.apache.wicket.markup.MarkupCache.loadMarkupAndWatchForChanges(MarkupCache.java:544)
      at org.apache.wicket.markup.MarkupCache.getMarkup(MarkupCache.java:305)
      at org.apache.wicket.markup.MarkupFactory.getMarkup(MarkupFactory.java:236)
      at org.apache.wicket.markup.MarkupFactory.getMarkup(MarkupFactory.java:194)
      at org.apache.wicket.MarkupContainer.getAssociatedMarkup(MarkupContainer.java:405)
      at org.apache.wicket.Component.getMarkup(Component.java:740)
      at org.apache.wicket.Component.internalRender(Component.java:2309)
      at org.apache.wicket.Component.render(Component.java:2272)
      at org.apache.wicket.Page.renderPage(Page.java:1024)
      at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:122)
      at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:276)
      at org.apache.wicket.util.tester.BaseWicketTester$LastPageRecordingPageRendererProvider$1.respond(BaseWicketTester.java:2657)
      at org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175)
      at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
      at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
      at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
      at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
      at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
      at org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:654)
      at org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:593)
      at org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:565)
      at org.apache.wicket.util.tester.BaseWicketTester.startPage(BaseWicketTester.java:1193)
      at org.apache.wicket.util.tester.BaseWicketTester.startPage(BaseWicketTester.java:1166)
      at com.mycompany.TestHomePage.can_render(TestHomePage.java:44)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
      Caused by: java.lang.NullPointerException
      at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:332)
      at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:987)
      at org.apache.wicket.application.AbstractClassResolver.resolveClass(AbstractClassResolver.java:60)
      at org.apache.wicket.core.util.lang.WicketObjects.resolveClass(WicketObjects.java:72)
      at org.apache.wicket.markup.MarkupResourceStream.getMarkupClass(MarkupResourceStream.java:171)
      at org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.getBaseMarkup(InheritedMarkupMarkupLoader.java:96)
      at org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.loadMarkup(InheritedMarkupMarkupLoader.java:68)
      at org.apache.wicket.markup.loader.DefaultMarkupLoader.loadMarkup(DefaultMarkupLoader.java:52)
      at org.apache.wicket.markup.MarkupFactory.loadMarkup(MarkupFactory.java:412)
      ... 49 more
      </pre>

        Attachments

        1. myproject.zip
          23 kB
          Per Newgro

          Activity

            People

            • Assignee:
              svenmeier Sven Meier
              Reporter:
              newgro Per Newgro
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: