Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-14405

Intermittent NPE when starting IDM with multiple servlet filters configured

    Details

    • Target Version/s:
    • Story Points:
      0
    • Sprint:
      2020.03 - IDM
    • Support Ticket IDs:

      Description

      A NullPointerException is observed when starting IDM.  This NPE occurs intermittently and some startups are successful.

      Note that to see this IDM should have multiple servlet filters configured.  The issue is not seen when only one filter is present.

       

      To attempt reproduction:

      • IDM 6.5.0.x
      • Configure two servlet filters, the OOTB CORS filter and the sample filter can be used in 6.5.0.1 (6.5.0.2+ has two filters OOTB).
      • Start IDM multiple times and it's possible a NPE may be seen at some point.

       

      The NullPointerException (full exception attached):

      [17] Feb 17, 2020 12:10:40.190 PM org.forgerock.openidm.config.logging.LogServiceTracker logEntry
      SEVERE: Bundle: org.forgerock.openidm.servlet-registrator [54] [org.forgerock.openidm.servletfilter(60)] The activate method has thrown an exception
      java.lang.NullPointerException
      	at org.ops4j.pax.web.utils.ServletContainerInitializerScanner.scanBundles(ServletContainerInitializerScanner.java:68)
      	at org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.addContext(JettyServerWrapper.java:292)
      	at org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:217)
      	at org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:198)
      	at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addFilter(JettyServerImpl.java:591)
      ...
      
      
      [17] Feb 17, 2020 12:10:40.198 PM org.forgerock.openidm.config.logging.LogServiceTracker logEntry
      SEVERE: Bundle: org.forgerock.openidm.servlet-registrator [54] [org.forgerock.openidm.servletfilter(63)] The activate method has thrown an exception
      java.lang.IllegalArgumentException: Filter [null is not currently registered in any context
      	at org.ops4j.pax.web.service.spi.model.ServiceModel.removeFilter(ServiceModel.java:201)
      	at org.ops4j.pax.web.service.internal.HttpServiceStarted.unregisterFilter(HttpServiceStarted.java:676)
      	at org.ops4j.pax.web.service.internal.HttpServiceProxy.unregisterFilter(HttpServiceProxy.java:246)
      	at org.forgerock.openidm.servletregistration.impl.ServletRegistrationSingleton.unregisterFilterWithWebContainer(ServletRegistrationSingleton.java:255)
      	at org.forgerock.openidm.servletregistration.impl.ServletRegistrationSingleton.registerFilter(ServletRegistrationSingleton.java:133)
      	at org.forgerock.openidm.servletregistration.impl.ServletFilterConfiguration.activate(ServletFilterConfiguration.java:83)
      ...

       

        Attachments

          Activity

            People

            • Assignee:
              travis.haagen Travis Haagen
              Reporter:
              andy.itter Andy Itter
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: