Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-95627

java.lang.NullPointerException when shutting down application server

    Description

    Steps to reproduce:

    1. Download 7.2.0 RC3 (CE or DXP)
    2. Start up Liferay portal instance
    3. Shutdown the appserver

    Expected result:
    The application server is successfully shut down without NPE.
    Actual result:

    2019-05-15 19:11:00.477 ERROR [Framework Event Dispatcher: Equinox Container: 76c13cd4-3c54-49ed-bb29-aa8b0428f8a6][org_eclipse_equinox_http_servlet:97] FrameworkEvent ERROR
    java.lang.NullPointerException
    	at com.liferay.portal.osgi.web.servlet.context.helper.internal.CustomServletContextHelper.contextDestroyed(CustomServletContextHelper.java:72)
    	at org.eclipse.equinox.http.servlet.internal.registration.ListenerRegistration.destroy(ListenerRegistration.java:85)
    	at org.eclipse.equinox.http.servlet.internal.customizer.ContextListenerTrackerCustomizer.removedService(ContextListenerTrackerCustomizer.java:100)
    	at org.eclipse.equinox.http.servlet.internal.customizer.ContextListenerTrackerCustomizer.removedService(ContextListenerTrackerCustomizer.java:1)
    	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:969)
    	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1)
    	at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:341)
    	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:911)
    	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:222)
    	at com.liferay.portal.osgi.web.servlet.context.helper.internal.ServletContextHelperRegistrationImpl.close(ServletContextHelperRegistrationImpl.java:133)
    	at com.liferay.portal.osgi.web.servlet.context.helper.internal.ServletContextHelperRegistrationServiceFactory.ungetService(ServletContextHelperRegistrationServiceFactory.java:58)
    	at com.liferay.portal.osgi.web.servlet.context.helper.internal.ServletContextHelperRegistrationServiceFactory.ungetService(ServletContextHelperRegistrationServiceFactory.java:31)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$2.run(ServiceFactoryUse.java:260)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$2.run(ServiceFactoryUse.java:1)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryUngetService(ServiceFactoryUse.java:258)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.ungetService(ServiceFactoryUse.java:160)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.ungetService(ServiceConsumer.java:50)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.ungetService(ServiceRegistrationImpl.java:609)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.ungetService(ServiceRegistry.java:543)
    	at org.eclipse.osgi.internal.framework.BundleContextImpl.ungetService(BundleContextImpl.java:666)
    	at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.destroy(WabBundleProcessor.java:119)
    	at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer.doStop(WebBundleDeployer.java:124)
    	at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory$WABExtension.destroy(WabFactory.java:109)
    	at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory.removedBundle(WabFactory.java:81)
    	at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory.removedBundle(WabFactory.java:49)
    	at org.osgi.util.tracker.BundleTracker$Tracked.customizerRemoved(BundleTracker.java:501)
    	at org.osgi.util.tracker.BundleTracker$Tracked.customizerRemoved(BundleTracker.java:1)
    	at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:341)
    	at org.osgi.util.tracker.BundleTracker.close(BundleTracker.java:195)
    	at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory.deactivate(WabFactory.java:151)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228)
    	at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41)
    	at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664)
    	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510)
    	at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:317)
    	at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:307)
    	at org.apache.felix.scr.impl.manager.SingleComponentManager.disposeImplementationObject(SingleComponentManager.java:408)
    	at org.apache.felix.scr.impl.manager.SingleComponentManager.deleteComponent(SingleComponentManager.java:163)
    	at org.apache.felix.scr.impl.manager.AbstractComponentManager.doDeactivate(AbstractComponentManager.java:831)
    	at org.apache.felix.scr.impl.manager.AbstractComponentManager.deactivateInternal(AbstractComponentManager.java:805)
    	at org.apache.felix.scr.impl.manager.DependencyManager.deactivateComponentManager(DependencyManager.java:2332)
    	at org.apache.felix.scr.impl.manager.DependencyManager.access$400(DependencyManager.java:56)
    	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.removedService(DependencyManager.java:1125)
    	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.removedService(DependencyManager.java:1007)
    	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1242)
    	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1137)
    	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.untrack(ServiceTracker.java:997)
    	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1176)
    	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125)
    	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:222)
    	at com.liferay.registry.internal.ServiceRegistrationWrapper.unregister(ServiceRegistrationWrapper.java:77)
    	at com.liferay.portal.internal.servlet.MainServlet.destroy(MainServlet.java:151)
    	at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1280)
    	at org.apache.catalina.core.StandardWrapper.stopInternal(StandardWrapper.java:1581)
    	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
    	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5376)
    	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
    	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1393)
    	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1382)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
    	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
    	at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:969)
    	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
    	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1393)
    	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1382)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
    	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
    	at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:969)
    	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
    	at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:475)
    	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
    	at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:990)
    	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
    	at org.apache.catalina.startup.Catalina.stop(Catalina.java:707)
    	at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:804)
    2019-05-15 19:11:00.534 ERROR [Framework Event Dispatcher: Equinox Container: 76c13cd4-3c54-49ed-bb29-aa8b0428f8a6][org_eclipse_equinox_http_servlet:97] FrameworkEvent ERROR
    java.lang.NullPointerException
    	at com.liferay.portal.osgi.web.servlet.context.helper.internal.CustomServletContextHelper.contextDestroyed(CustomServletContextHelper.java:72)
    	at org.eclipse.equinox.http.servlet.internal.registration.ListenerRegistration.destroy(ListenerRegistration.java:85)
    	at org.eclipse.equinox.http.servlet.internal.customizer.ContextListenerTrackerCustomizer.removedService(ContextListenerTrackerCustomizer.java:100)
    	at org.eclipse.equinox.http.servlet.internal.customizer.ContextListenerTrackerCustomizer.removedService(ContextListenerTrackerCustomizer.java:1)
    	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:969)
    	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1)
    	at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:341)
    	at org.osgi.util.tracker.ServiceTracker.close(ServiceTracker.java:380)
    	at org.eclipse.equinox.http.servlet.internal.context.ContextController.destroy(ContextController.java:578)
    	at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl.removedService(HttpServiceRuntimeImpl.java:322)
    	at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl.removedService(HttpServiceRuntimeImpl.java:1)
    	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:969)
    	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1)
    	at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:341)
    	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:911)
    	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:222)
    	at com.liferay.portal.osgi.web.servlet.context.helper.internal.ServletContextHelperRegistrationImpl.close(ServletContextHelperRegistrationImpl.java:124)
    	at com.liferay.portal.osgi.web.servlet.context.helper.internal.ServletContextHelperRegistrationServiceFactory.ungetService(ServletContextHelperRegistrationServiceFactory.java:58)
    	at com.liferay.portal.osgi.web.servlet.context.helper.internal.ServletContextHelperRegistrationServiceFactory.ungetService(ServletContextHelperRegistrationServiceFactory.java:31)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$2.run(ServiceFactoryUse.java:260)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$2.run(ServiceFactoryUse.java:1)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryUngetService(ServiceFactoryUse.java:258)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.ungetService(ServiceFactoryUse.java:160)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.ungetService(ServiceConsumer.java:50)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.ungetService(ServiceRegistrationImpl.java:609)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.ungetService(ServiceRegistry.java:543)
    	at org.eclipse.osgi.internal.framework.BundleContextImpl.ungetService(BundleContextImpl.java:666)
    	at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.destroy(WabBundleProcessor.java:119)
    	at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer.doStop(WebBundleDeployer.java:124)
    	at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory$WABExtension.destroy(WabFactory.java:109)
    	at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory.removedBundle(WabFactory.java:81)
    	at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory.removedBundle(WabFactory.java:49)
    	at org.osgi.util.tracker.BundleTracker$Tracked.customizerRemoved(BundleTracker.java:501)
    	at org.osgi.util.tracker.BundleTracker$Tracked.customizerRemoved(BundleTracker.java:1)
    	at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:341)
    	at org.osgi.util.tracker.BundleTracker.close(BundleTracker.java:195)
    	at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory.deactivate(WabFactory.java:151)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228)
    	at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41)
    	at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664)
    	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510)
    	at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:317)
    	at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:307)
    	at org.apache.felix.scr.impl.manager.SingleComponentManager.disposeImplementationObject(SingleComponentManager.java:408)
    	at org.apache.felix.scr.impl.manager.SingleComponentManager.deleteComponent(SingleComponentManager.java:163)
    	at org.apache.felix.scr.impl.manager.AbstractComponentManager.doDeactivate(AbstractComponentManager.java:831)
    	at org.apache.felix.scr.impl.manager.AbstractComponentManager.deactivateInternal(AbstractComponentManager.java:805)
    	at org.apache.felix.scr.impl.manager.DependencyManager.deactivateComponentManager(DependencyManager.java:2332)
    	at org.apache.felix.scr.impl.manager.DependencyManager.access$400(DependencyManager.java:56)
    	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.removedService(DependencyManager.java:1125)
    	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.removedService(DependencyManager.java:1007)
    	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1242)
    	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1137)
    	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.untrack(ServiceTracker.java:997)
    	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1176)
    	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125)
    	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
    	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:222)
    	at com.liferay.registry.internal.ServiceRegistrationWrapper.unregister(ServiceRegistrationWrapper.java:77)
    	at com.liferay.portal.internal.servlet.MainServlet.destroy(MainServlet.java:151)
    	at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1280)
    	at org.apache.catalina.core.StandardWrapper.stopInternal(StandardWrapper.java:1581)
    	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
    	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5376)
    	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
    	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1393)
    	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1382)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
    	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
    	at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:969)
    	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
    	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1393)
    	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1382)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
    	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
    	at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:969)
    	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
    	at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:475)
    	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
    	at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:990)
    	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
    	at org.apache.catalina.startup.Catalina.stop(Catalina.java:707)
    	at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:804)
    

      Attachments

        Activity

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 18 weeks, 3 days ago

              Packages

              Version Package