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

Disable strong references in cache

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.18
    • Fix Version/s: 1.5.0
    • Component/s: wicket
    • Labels:
    • Environment:
      Felix 3.0.9, Karaf 2.2.2

      Description

      During work on new Karaf WebConsole I figured multiple problems with resource caching in Wicket. The problem becames really painfull once I try to update some parts of application. After all I am forced to restart container to get updates working. First issue I meet is:

      org.apache.wicket.WicketRuntimeException: Parameter clazz must be an instance of org.apache.karaf.webconsole.core.page.LoginPage, but is a org.apache.karaf.webconsole.core.BasePage
      at org.apache.wicket.markup.MarkupCache.getMarkup(MarkupCache.java:286)
      at org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.getBaseMarkup(InheritedMarkupMarkupLoader.java:122)
      at org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.checkForMarkupInheritance(InheritedMarkupMarkupLoader.java:94)
      at org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.loadMarkup(InheritedMarkupMarkupLoader.java:63)
      at org.apache.wicket.markup.loader.DefaultMarkupLoader.loadMarkup(DefaultMarkupLoader.java:55)
      at org.apache.wicket.markup.MarkupCache.loadMarkup(MarkupCache.java:465)
      at org.apache.wicket.markup.MarkupCache.loadMarkupAndWatchForChanges(MarkupCache.java:561)
      at org.apache.wicket.markup.MarkupCache.getMarkup(MarkupCache.java:325)
      at org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:216)
      at org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:371)
      at org.apache.wicket.Page.onRender(Page.java:1587)
      at org.apache.wicket.Component.render(Component.java:2524)
      at org.apache.wicket.Page.renderPage(Page.java:932)
      at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:261)
      at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
      at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1260)
      at org.apache.wicket.RequestCycle.step(RequestCycle.java:1331)
      at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1438)
      at org.apache.wicket.RequestCycle.request(RequestCycle.java:546)
      at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
      at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
      at org.ops4j.pax.wicket.internal.FilterDelegator$Chain.doFilter(FilterDelegator.java:79)
      at org.ops4j.pax.wicket.internal.FilterDelegator.doFilter(FilterDelegator.java:61)
      at org.ops4j.pax.wicket.internal.ServletProxy$ServletInvocationHandler.invoke(ServletProxy.java:72)
      at $Proxy37.service(Unknown Source)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:478)
      at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:480)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:937)
      at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:116)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
      at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:72)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
      at org.eclipse.jetty.server.Server.handle(Server.java:346)
      at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)
      at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1048)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:601)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214)
      at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
      at java.lang.Thread.run(Thread.java:680)

      Complete stack:

      org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html' for component 'org.apache.karaf.webconsole.core.page.LoginPage' not found. Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried:
      [Page class = org.apache.karaf.webconsole.core.page.LoginPage, id = 0, version = 0]
      at org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:390)
      at org.apache.wicket.Page.onRender(Page.java:1587)
      at org.apache.wicket.Component.render(Component.java:2524)
      at org.apache.wicket.Page.renderPage(Page.java:932)
      at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:261)
      at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
      at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1260)
      at org.apache.wicket.RequestCycle.step(RequestCycle.java:1331)
      at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1438)
      at org.apache.wicket.RequestCycle.request(RequestCycle.java:546)
      at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)

      So I decided to clear markup cache after any update in environment to start with empty bag. Then I've got following error:
      org.apache.wicket.markup.MarkupNotFoundException: Base markup of inherited markup not found. Component class: org.apache.karaf.webconsole.karaf.features.repository.RepositoriesPage. Enable debug messages for org.apache.wicket.util.resource.locator.ResourceStreamLocator to get a list of all filenames tried.
      at org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.checkForMarkupInheritance(InheritedMarkupMarkupLoader.java:98)
      at org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.loadMarkup(InheritedMarkupMarkupLoader.java:63)
      at org.apache.wicket.markup.loader.DefaultMarkupLoader.loadMarkup(DefaultMarkupLoader.java:55)
      at org.apache.wicket.markup.MarkupCache.loadMarkup(MarkupCache.java:465)
      at org.apache.wicket.markup.MarkupCache.loadMarkupAndWatchForChanges(MarkupCache.java:561)
      at org.apache.wicket.markup.MarkupCache.getMarkup(MarkupCache.java:325)
      at org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.getBaseMarkup(InheritedMarkupMarkupLoader.java:122)
      at org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.checkForMarkupInheritance(InheritedMarkupMarkupLoader.java:94)
      at org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.loadMarkup(InheritedMarkupMarkupLoader.java:63)
      at org.apache.wicket.markup.loader.DefaultMarkupLoader.loadMarkup(DefaultMarkupLoader.java:55)
      at org.apache.wicket.markup.MarkupCache.loadMarkup(MarkupCache.java:465)
      at org.apache.wicket.markup.MarkupCache.loadMarkupAndWatchForChanges(MarkupCache.java:561)
      at org.apache.wicket.markup.MarkupCache.getMarkup(MarkupCache.java:325)
      at org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.getBaseMarkup(InheritedMarkupMarkupLoader.java:122)
      at org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.checkForMarkupInheritance(InheritedMarkupMarkupLoader.java:94)
      at org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.loadMarkup(InheritedMarkupMarkupLoader.java:63)
      at org.apache.wicket.markup.loader.DefaultMarkupLoader.loadMarkup(DefaultMarkupLoader.java:55)
      at org.apache.wicket.markup.MarkupCache.loadMarkup(MarkupCache.java:465)
      at org.apache.wicket.markup.MarkupCache.loadMarkupAndWatchForChanges(MarkupCache.java:561)
      at org.apache.wicket.markup.MarkupCache.getMarkup(MarkupCache.java:325)
      at org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:216)
      at org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:371)
      at org.apache.wicket.Page.onRender(Page.java:1587)
      at org.apache.wicket.Component.render(Component.java:2524)
      at org.apache.wicket.Page.renderPage(Page.java:932)
      at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:261)
      at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
      at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1260)
      at org.apache.wicket.RequestCycle.step(RequestCycle.java:1331)
      at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1438)
      at org.apache.wicket.RequestCycle.request(RequestCycle.java:546)
      at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
      at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
      at org.ops4j.pax.wicket.internal.FilterDelegator$Chain.doFilter(FilterDelegator.java:79)
      at org.ops4j.pax.wicket.internal.FilterDelegator.doFilter(FilterDelegator.java:61)
      at org.ops4j.pax.wicket.internal.ServletProxy$ServletInvocationHandler.invoke(ServletProxy.java:72)
      at $Proxy37.service(Unknown Source)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:478)
      at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:480)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:937)
      at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:116)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
      at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:72)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
      at org.eclipse.jetty.server.Server.handle(Server.java:346)
      at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)
      at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1048)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:601)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214)
      at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
      at java.lang.Thread.run(Thread.java:680)

      Of course the markup is present in both cases. Works well after restart.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ldywicki Ɓukasz Dywicki
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: