You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A NullPointerException occurs when automation bundle is stopped after test executions in eclipse.
In the stop method of the automation.core.Activator, serviceTracker.close is called, which results in a removedService call of the ServiceTrackerCustomizer. This uses the ruleRegistry, but it was already set to null in the stop method.
There has to be added a null-check for the ruleRegistry in ServiceTrackerCustomizer and the serviceTracker.close() should be called before the ruleRegistry is set to null...
StackTrace:
org.osgi.framework.BundleException: Exception in org.eclipse.smarthome.automation.core.internal.Activator.stop() of bundle org.eclipse.smarthome.automation.core.
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:847)
at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:950)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:324)
at org.eclipse.osgi.container.Module.doStop(Module.java:626)
at org.eclipse.osgi.container.Module.stop(Module.java:488)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1623)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1542)
at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:248)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:145)
at org.eclipse.osgi.container.Module.doStop(Module.java:626)
at org.eclipse.osgi.container.Module.stop(Module.java:488)
at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:186)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:160)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at org.eclipse.smarthome.automation.core.internal.Activator$1.removedService(Activator.java:139)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:967)
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:377)
at org.eclipse.smarthome.automation.core.internal.Activator.stop(Activator.java:187)
at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:827)
at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:820)
... 13 more
Root exception:
java.lang.NullPointerException
at org.eclipse.smarthome.automation.core.internal.Activator$1.removedService(Activator.java:139)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:967)
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:377)
at org.eclipse.smarthome.automation.core.internal.Activator.stop(Activator.java:187)
at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:827)
at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:820)
at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:950)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:324)
at org.eclipse.osgi.container.Module.doStop(Module.java:626)
at org.eclipse.osgi.container.Module.stop(Module.java:488)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1623)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1542)
at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:248)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:145)
at org.eclipse.osgi.container.Module.doStop(Module.java:626)
at org.eclipse.osgi.container.Module.stop(Module.java:488)
at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:186)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:160)
at java.lang.Thread.run(Thread.java:745)
The text was updated successfully, but these errors were encountered:
A NullPointerException occurs when automation bundle is stopped after test executions in eclipse.
In the stop method of the automation.core.Activator, serviceTracker.close is called, which results in a removedService call of the ServiceTrackerCustomizer. This uses the ruleRegistry, but it was already set to null in the stop method.
There has to be added a null-check for the ruleRegistry in ServiceTrackerCustomizer and the serviceTracker.close() should be called before the ruleRegistry is set to null...
StackTrace:
org.osgi.framework.BundleException: Exception in org.eclipse.smarthome.automation.core.internal.Activator.stop() of bundle org.eclipse.smarthome.automation.core.
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:847)
at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:950)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:324)
at org.eclipse.osgi.container.Module.doStop(Module.java:626)
at org.eclipse.osgi.container.Module.stop(Module.java:488)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1623)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1542)
at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:248)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:145)
at org.eclipse.osgi.container.Module.doStop(Module.java:626)
at org.eclipse.osgi.container.Module.stop(Module.java:488)
at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:186)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:160)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at org.eclipse.smarthome.automation.core.internal.Activator$1.removedService(Activator.java:139)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:967)
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:377)
at org.eclipse.smarthome.automation.core.internal.Activator.stop(Activator.java:187)
at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:827)
at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:820)
... 13 more
Root exception:
java.lang.NullPointerException
at org.eclipse.smarthome.automation.core.internal.Activator$1.removedService(Activator.java:139)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:967)
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:377)
at org.eclipse.smarthome.automation.core.internal.Activator.stop(Activator.java:187)
at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:827)
at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:820)
at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:950)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:324)
at org.eclipse.osgi.container.Module.doStop(Module.java:626)
at org.eclipse.osgi.container.Module.stop(Module.java:488)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1623)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1542)
at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:248)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:145)
at org.eclipse.osgi.container.Module.doStop(Module.java:626)
at org.eclipse.osgi.container.Module.stop(Module.java:488)
at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:186)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:160)
at java.lang.Thread.run(Thread.java:745)
The text was updated successfully, but these errors were encountered: