Uploaded image for project: 'Identity Gateway'
  1. Identity Gateway
  2. OPENIG-653

NPE in RouterHandler.destroy() with outdated configuration

    XMLWordPrintable

    Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.0.0
    • 4.0.0, 5.0.0
    • Core
    • Java 8, Jetty 8
    • OpenIG Sprint 72, OpenIG Sprint 73

      Description

      Starting OpenIG with the attached (outdated) config.json results in an NPE in RouterHandler.destroy() that prevents OpenIG from being available in Jetty.

      The Jetty output follows:

      2015-09-23 00:41:39.965:INFO:oms.SetUIDServer:Setting umask=02
      2015-09-23 00:41:39.983:INFO:oms.SetUIDServer:Setting UID=1000
      2015-09-23 00:41:39.989:INFO:oejs.Server:jetty-8.1.14.v20131031
      2015-09-23 00:41:40.044:INFO:oejdp.ScanningAppProvider:Deployment monitor /opt/demo/openig/webapps at interval 1
      2015-09-23 00:41:40.052:INFO:oejd.DeploymentManager:Deployable added: /opt/demo/openig/webapps/root.war
      2015-09-23 00:41:40.178:INFO:oejw.WebInfConfiguration:Extract jar:file:/opt/demo/openig/webapps/root.war!/ to /opt/demo/openig/working/jetty-0.0.0.0-443-root.war-_-any-/webapp
      SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
      SLF4J: Defaulting to no-operation (NOP) logger implementation
      SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
      2015-09-23 00:42:00.656:WARN:root:unavailable
      java.lang.NullPointerException
      	at org.forgerock.openig.handler.router.RouterHandler$Heaplet.destroy(RouterHandler.java:317)
      	at org.forgerock.openig.heap.HeapImpl.destroy(HeapImpl.java:547)
      	at org.forgerock.openig.http.GatewayHttpApplication.stop(GatewayHttpApplication.java:197)
      	at org.forgerock.openig.http.GatewayHttpApplication.start(GatewayHttpApplication.java:183)
      	at org.forgerock.http.servlet.HttpFrameworkServlet.init(HttpFrameworkServlet.java:136)
      	at javax.servlet.GenericServlet.init(GenericServlet.java:244)
      	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:532)
      	at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:344)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:791)
      	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
      	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
      	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
      	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:39)
      	at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
      	at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:494)
      	at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:141)
      	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:145)
      	at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:56)
      	at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:615)
      	at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:540)
      	at org.eclipse.jetty.util.Scanner.scan(Scanner.java:403)
      	at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:337)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:121)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:555)
      	at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:230)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:81)
      	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:58)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:96)
      	at org.eclipse.jetty.server.Server.doStart(Server.java:282)
      	at org.mortbay.setuid.SetUIDServer.doStart(SetUIDServer.java:178)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1274)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1197)
      2015-09-23 00:42:00.657:WARN:oejuc.AbstractLifeCycle:FAILED HttpFrameworkServlet: javax.servlet.ServletException: HttpFrameworkServlet
      javax.servlet.ServletException: HttpFrameworkServlet
      	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:553)
      	at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:344)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:791)
      	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
      	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
      	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
      	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:39)
      	at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
      	at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:494)
      	at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:141)
      	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:145)
      	at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:56)
      	at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:615)
      	at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:540)
      	at org.eclipse.jetty.util.Scanner.scan(Scanner.java:403)
      	at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:337)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:121)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:555)
      	at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:230)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:81)
      	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:58)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:96)
      	at org.eclipse.jetty.server.Server.doStart(Server.java:282)
      	at org.mortbay.setuid.SetUIDServer.doStart(SetUIDServer.java:178)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1274)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1197)
      Caused by: 
      java.lang.NullPointerException
      	at org.forgerock.openig.handler.router.RouterHandler$Heaplet.destroy(RouterHandler.java:317)
      	at org.forgerock.openig.heap.HeapImpl.destroy(HeapImpl.java:547)
      	at org.forgerock.openig.http.GatewayHttpApplication.stop(GatewayHttpApplication.java:197)
      	at org.forgerock.openig.http.GatewayHttpApplication.start(GatewayHttpApplication.java:183)
      	at org.forgerock.http.servlet.HttpFrameworkServlet.init(HttpFrameworkServlet.java:136)
      	at javax.servlet.GenericServlet.init(GenericServlet.java:244)
      	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:532)
      	at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:344)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:791)
      	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
      	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
      	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
      	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:39)
      	at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
      	at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:494)
      	at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:141)
      	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:145)
      	at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:56)
      	at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:615)
      	at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:540)
      	at org.eclipse.jetty.util.Scanner.scan(Scanner.java:403)
      	at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:337)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:121)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:555)
      	at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:230)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:81)
      	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:58)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:96)
      	at org.eclipse.jetty.server.Server.doStart(Server.java:282)
      	at org.mortbay.setuid.SetUIDServer.doStart(SetUIDServer.java:178)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1274)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1197)
      2015-09-23 00:42:00.659:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/,file:/opt/demo/openig/working/jetty-0.0.0.0-443-root.war-_-any-/webapp/},/opt/demo/openig/webapps/root.war
      javax.servlet.ServletException: HttpFrameworkServlet
      	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:553)
      	at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:344)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:791)
      	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
      	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
      	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
      	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:39)
      	at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
      	at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:494)
      	at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:141)
      	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:145)
      	at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:56)
      	at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:615)
      	at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:540)
      	at org.eclipse.jetty.util.Scanner.scan(Scanner.java:403)
      	at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:337)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:121)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:555)
      	at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:230)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:81)
      	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:58)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:96)
      	at org.eclipse.jetty.server.Server.doStart(Server.java:282)
      	at org.mortbay.setuid.SetUIDServer.doStart(SetUIDServer.java:178)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1274)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1197)
      Caused by: 
      java.lang.NullPointerException
      	at org.forgerock.openig.handler.router.RouterHandler$Heaplet.destroy(RouterHandler.java:317)
      	at org.forgerock.openig.heap.HeapImpl.destroy(HeapImpl.java:547)
      	at org.forgerock.openig.http.GatewayHttpApplication.stop(GatewayHttpApplication.java:197)
      	at org.forgerock.openig.http.GatewayHttpApplication.start(GatewayHttpApplication.java:183)
      	at org.forgerock.http.servlet.HttpFrameworkServlet.init(HttpFrameworkServlet.java:136)
      	at javax.servlet.GenericServlet.init(GenericServlet.java:244)
      	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:532)
      	at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:344)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:791)
      	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
      	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
      	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
      	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:39)
      	at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
      	at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:494)
      	at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:141)
      	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:145)
      	at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:56)
      	at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:615)
      	at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:540)
      	at org.eclipse.jetty.util.Scanner.scan(Scanner.java:403)
      	at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:337)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:121)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:555)
      	at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:230)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:81)
      	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:58)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:96)
      	at org.eclipse.jetty.server.Server.doStart(Server.java:282)
      	at org.mortbay.setuid.SetUIDServer.doStart(SetUIDServer.java:178)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1274)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1197)
      2015-09-23 00:42:00.990:INFO:oejus.SslContextFactory:Enabled Protocols [SSLv2Hello, TLSv1, TLSv1.1, TLSv1.2] of [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2]
      2015-09-23 00:42:01.013:INFO:oejs.AbstractConnector:Started SslSelectChannelConnector@0.0.0.0:443
      2015-09-23 00:42:10.869:INFO:oejs.Server:Graceful shutdown SslSelectChannelConnector@0.0.0.0:443
      2015-09-23 00:42:10.870:INFO:oejs.Server:Graceful shutdown o.e.j.w.WebAppContext{/,file:/opt/demo/openig/working/jetty-0.0.0.0-443-root.war-_-any-/webapp/},/opt/demo/openig/webapps/root.war
      2015-09-23 00:42:11.902:INFO:oejsl.ELContextCleaner:javax.el.BeanELResolver purged
      2015-09-23 00:42:11.902:INFO:oejsh.ContextHandler:stopped o.e.j.w.WebAppContext{/,file:/opt/demo/openig/working/jetty-0.0.0.0-443-root.war-_-any-/webapp/},/opt/demo/openig/webapps/root.war
      

        Attachments

          Activity

            People

            guillaume.sauthier Guillaume Sauthier
            Mark Mark Craig
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: