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

BundleStringResourceLoader throws NPE if component is null

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.1
    • Fix Version/s: 1.3.3
    • Component/s: wicket
    • Labels:
      None

      Description

      When an AjaxServerAndClientTimeFilter calls its method "getStatusString", no component is set as attached object. Thus, when calling loadStringResource(final Component component, final String key) in BundleStringResourceLoader, a NullPointerException is thrown.

      The error occured after we added a BundleStringResourceLoader to our applicationsettings (webApplication.getResourceSettings().addStringResourceLoader(blah))

      Stacktrace:
      java.lang.NullPointerException
      at org.apache.wicket.resource.loader.BundleStringResourceLoader.loadStringResource(BundleStringResourceLoader.java:94)
      at org.apache.wicket.Localizer.getString(Localizer.java:221)
      at org.apache.wicket.Localizer.getString(Localizer.java:131)
      at org.apache.wicket.markup.html.AjaxServerAndClientTimeFilter.getStatusString(AjaxServerAndClientTimeFilter.java:97)
      at org.apache.wicket.markup.html.AjaxServerAndClientTimeFilter.filter(AjaxServerAndClientTimeFilter.java:62)
      at org.apache.wicket.Response.filter(Response.java:104)
      at org.apache.wicket.protocol.http.BufferedWebResponse.filter(BufferedWebResponse.java:123)
      at org.apache.wicket.RequestCycle.detach(RequestCycle.java:1104)
      at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1334)
      at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
      at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
      at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
      at com.planetj.servlet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:222)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
      at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
      at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
      at org.mortbay.jetty.Server.handle(Server.java:313)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
      at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
      at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

        Attachments

          Activity

            People

            • Assignee:
              ivaynberg Igor Vaynberg
              Reporter:
              tonyvegas Tony Vegas
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: