Uploaded image for project: 'Pax Web'
  1. PAXWEB-1186

NullPointerException in JettyServerWrapper.configureSessionManager because SessionIdManager is not initialized

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.2.3
    • Fix Version/s: 8.0.0, 7.2.4
    • Component/s: Jetty Container
    • Labels:
      None
    • Sprint:

      Description

      After upgrade from Pax-Web 4.4.1 to 7.2.3 I have a NullPointerException in JettyServerWrapper.configureSessionManager.

      I am using Servlet service registration. It looks like SessionIdManager is not initialized? In the previous versions of PaxWeb there was a lazy initialization of SessionIdManager in configureSessionManager method (when workerName != null). It was changed in commit 7b030007fbaa1181f195e0d1ce3eec981e82715d during upgrade to Jetty 9.4 ( PAXWEB-1095 Resolved ).

      What is a proper way to use this now for my use case? Should I initialize this SessionIdManager myself?

      java.lang.NullPointerException
          at org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.configureSessionManager(JettyServerWrapper.java:600)
          at org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.addContext(JettyServerWrapper.java:328)
          at org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:206)
          at org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:187)
          at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addServlet(JettyServerImpl.java:390)
          at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Started.addServlet(ServerControllerImpl.java:316)
          at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.addServlet(ServerControllerImpl.java:121)
          at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:247)
          at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:223)
          at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:207)
          at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(HttpServiceProxy.java:69)
          at org.ops4j.pax.web.extender.whiteboard.internal.element.ServletWebElement.register(ServletWebElement.java:88)
          at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerWebElement(WebApplication.java:392)
          at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.addWebElement(WebApplication.java:188)
          at org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker.addingService(AbstractTracker.java:193)
          at org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker.addingService(AbstractTracker.java:46)
          at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943)
          at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
          at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
          at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
          at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:903)
          at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:112)
          at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:923)
          at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:233)
          at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
          at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:865)
          at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
          at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
          at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
          at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:472)
          at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:490)
          at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1007)
      

        Attachments

          Activity

            People

            • Assignee:
              ggrzybek Grzegorz Grzybek
              Reporter:
              dstoch Daniel Stoch
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: