Details

      Description

      When redeploying a CDI bundle, we might see the following exception:

      java.lang.IllegalStateException: Context is already shutdown
              at org.eclipse.equinox.http.servlet.internal.context.ContextController.checkShutdown(ContextController.java:1008)
              at org.eclipse.equinox.http.servlet.internal.context.ContextController.getProxyContext(ContextController.java:809)
              at org.eclipse.equinox.http.servlet.internal.registration.ListenerRegistration.destroyContextAttributes(ListenerRegistration.java:127)
              at org.eclipse.equinox.http.servlet.internal.registration.ListenerRegistration.destroy(ListenerRegistration.java:90)
              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 org.apache.aries.cdi.extension.http.HttpExtension.beforeShutdown(HttpExtension.java:262)
              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.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95)
              at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:85)
              at org.jboss.weld.injection.MethodInvocationStrategy$SimpleMethodInvocationStrategy.invoke(MethodInvocationStrategy.java:129)
              at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:330)
              at org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:123)
              at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:308)
              at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:286)
              at javax.enterprise.inject.spi.ObserverMethod.notify(ObserverMethod.java:114)
              at org.jboss.weld.util.Observers.notify(Observers.java:166)
              at org.jboss.weld.event.ObserverNotifier.notifySyncObservers(ObserverNotifier.java:285)
              at org.jboss.weld.event.ObserverNotifier.notify(ObserverNotifier.java:273)
              at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:177)
              at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:171)
              at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:53)
              at org.jboss.weld.bootstrap.events.BeforeShutdownImpl.fire(BeforeShutdownImpl.java:41)
              at org.jboss.weld.bootstrap.events.BeforeShutdownImpl.fire(BeforeShutdownImpl.java:32)
              at org.jboss.weld.bootstrap.WeldRuntime.shutdown(WeldRuntime.java:69)
              at org.jboss.weld.bootstrap.WeldBootstrap.shutdown(WeldBootstrap.java:116)
              at org.apache.aries.cdi.container.internal.container.ContainerBootstrap.close(ContainerBootstrap.java:56)
              at org.apache.aries.cdi.container.internal.container.ContainerState.submit(ContainerState.java:347)
              at org.apache.aries.cdi.container.internal.container.Phase.submit(Phase.java:50)
              at org.apache.aries.cdi.container.internal.model.ContainerActivator.lambda$close$2(ContainerActivator.java:52)
              at java.util.Optional.map(Optional.java:215)
              at org.apache.aries.cdi.container.internal.model.ContainerActivator.close(ContainerActivator.java:50)
              at org.apache.aries.cdi.container.internal.model.ExtendedComponentInstanceDTO.lambda$null$1(ExtendedComponentInstanceDTO.java:86)
              at org.apache.aries.cdi.container.internal.container.ContainerState.submit(ContainerState.java:347)
              at org.apache.aries.cdi.container.internal.model.ExtendedComponentInstanceDTO.lambda$close$4(ExtendedComponentInstanceDTO.java:84)
              at org.apache.aries.cdi.container.internal.container.ContainerState.submit(ContainerState.java:347)
              at org.apache.aries.cdi.container.internal.model.ExtendedComponentInstanceDTO.close(ExtendedComponentInstanceDTO.java:73)
              at org.apache.aries.cdi.container.internal.container.ContainerState.submit(ContainerState.java:347)
              at org.apache.aries.cdi.container.internal.container.Phase.submit(Phase.java:50)
              at org.apache.aries.cdi.container.internal.model.ContainerComponent.lambda$close$2(ContainerComponent.java:70)
              at java.util.concurrent.CopyOnWriteArrayList.removeIf(CopyOnWriteArrayList.java:907)
              at org.apache.aries.cdi.container.internal.model.ContainerComponent.close(ContainerComponent.java:66)
              at org.apache.aries.cdi.container.internal.container.ContainerState.submit(ContainerState.java:347)
              at org.apache.aries.cdi.container.internal.container.Phase.submit(Phase.java:50)
              at org.apache.aries.cdi.container.internal.container.ConfigurationListener.lambda$close$2(ConfigurationListener.java:84)
              at java.util.Optional.map(Optional.java:215)
              at org.apache.aries.cdi.container.internal.container.ConfigurationListener.close(ConfigurationListener.java:82)
              at org.apache.aries.cdi.container.internal.container.ContainerState.submit(ContainerState.java:347)
              at org.apache.aries.cdi.container.internal.container.Phase.submit(Phase.java:50)
              at org.apache.aries.cdi.container.internal.container.ExtensionPhase$ExtensionPhaseCustomizer.lambda$removedService$17(ExtensionPhase.java:254)
              at java.util.Optional.ifPresent(Optional.java:159)
              at org.apache.aries.cdi.container.internal.container.ExtensionPhase$ExtensionPhaseCustomizer.removedService(ExtensionPhase.java:252)
              at org.apache.aries.cdi.container.internal.container.ExtensionPhase$ExtensionPhaseCustomizer.removedService(ExtensionPhase.java:158)
              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.apache.aries.cdi.container.internal.container.ExtensionPhase.close(ExtensionPhase.java:56)
              at org.apache.aries.cdi.container.internal.container.ContainerState.submit(ContainerState.java:347)
              at org.apache.aries.cdi.container.internal.container.Phase.submit(Phase.java:50)
              at org.apache.aries.cdi.container.internal.container.CDIBundle.lambda$close$2(CDIBundle.java:38)
              at java.util.Optional.map(Optional.java:215)
              at org.apache.aries.cdi.container.internal.container.CDIBundle.close(CDIBundle.java:36)
              at org.apache.aries.cdi.container.internal.container.CDIBundle.destroy(CDIBundle.java:61)
              at org.apache.felix.utils.extender.AbstractExtender$2.run(AbstractExtender.java:285)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at org.apache.felix.utils.extender.AbstractExtender.destroyExtension(AbstractExtender.java:307)
              at org.apache.felix.utils.extender.AbstractExtender.bundleChanged(AbstractExtender.java:181)
              at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908)
              at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
              at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
              at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:230)
              at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:137)
              at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:129)
              at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:191)
              at org.eclipse.osgi.container.Module.publishEvent(Module.java:476)
              at org.eclipse.osgi.container.Module.doStop(Module.java:634)
              at org.eclipse.osgi.container.Module.stop(Module.java:498)
              at org.eclipse.osgi.internal.framework.EquinoxBundle.stop(EquinoxBundle.java:455)
              at org.apache.felix.fileinstall.internal.DirectoryWatcher.stopTransient(DirectoryWatcher.java:1191)
              at org.apache.felix.fileinstall.internal.DirectoryWatcher.update(DirectoryWatcher.java:1132)
              at org.apache.felix.fileinstall.internal.DirectoryWatcher.update(DirectoryWatcher.java:906)
              at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:484)
              at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361)
       

        Attachments

          Activity

            People

            • Assignee:
              brian.chan Brian Chan
              Reporter:
              raymond.auge Raymond Auge
              Participants of an Issue:
              Recent user:
              Clarissa Velazquez
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                12 weeks, 1 day ago