Bram de Kruijff created ACE-276:
-----------------------------------
Summary: Disabling activator is managementagent triggers
NullPointerException on shutdown
Key: ACE-276
URL: https://issues.apache.org/jira/browse/ACE-276
Project: ACE
Issue Type: Bug
Affects Versions: 0.8.0
Reporter: Bram de Kruijff
The managementagent activator support disabling hardcoded activators through
system properties. When the package is "disabled" the start() is never called.
However, on destroy all activators receive a stop() regardless whether they
where started or not. In the case of a dm activator this will trigger a NPE.
Obviously we must not call stop() on activators that never received a start().
{code}
ERROR: Bundle org.apache.ace.managementagent [21] Error stopping bundle.
(java.lang.NullPointerException)
java.lang.NullPointerException
at
org.apache.felix.dm.DependencyActivatorBase.cleanup(DependencyActivatorBase.java:299)
ERROR: Bundle org.apache.ace.managementagent [21] EventDispatcher: Error during
dispatch. (java.lang.IllegalStateException: Invalid BundleContext.)
at
org.apache.felix.dm.DependencyActivatorBase.stop(DependencyActivatorBase.java:90)
ERROR: Bundle org.apache.ace.managementagent [21] EventDispatcher: Error during
dispatch. (java.lang.IllegalStateException: Invalid BundleContext.)
ERROR: Bundle org.apache.ace.managementagent [21] EventDispatcher: Error during
dispatch. (java.lang.IllegalStateException: Invalid BundleContext.)
at org.apache.ace.managementagent.Activator.destroy(Activator.java:62)
at
org.apache.felix.dm.DependencyActivatorBase.stop(DependencyActivatorBase.java:89)
at
org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:663)
at org.apache.felix.framework.Felix.stopBundle(Felix.java:2361)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1214)
at
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
at java.lang.Thread.run(Thread.java:722)
java.lang.IllegalStateException: Invalid BundleContext.
ERROR: Bundle org.apache.ace.managementagent [21] EventDispatcher: Error during
dispatch. (java.lang.IllegalStateException: Invalid BundleContext.)
at
org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:514)
at
org.apache.felix.framework.BundleContextImpl.ungetService(BundleContextImpl.java:473)
ERROR: Bundle org.apache.ace.managementagent [21] EventDispatcher: Error during
dispatch. (java.lang.IllegalStateException: Invalid BundleContext.)
ERROR: Bundle org.apache.ace.managementagent [21] EventDispatcher: Error during
dispatch. (java.lang.IllegalStateException: Invalid BundleContext.)
at org.apache.felix.dm.impl.Logger.serviceChanged(Logger.java:193)
at
org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:932)
at
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:793)
at
org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:543)
at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4260)
at org.apache.felix.framework.Felix.access$000(Felix.java:74)
at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:390)
at
org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:148)
at
org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:127)
at
org.apache.felix.framework.ServiceRegistry.unregisterServices(ServiceRegistry.java:191)
at org.apache.felix.framework.Felix.stopBundle(Felix.java:2386)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1214)
at
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
at java.lang.Thread.run(Thread.java:722)
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira