[
https://issues.apache.org/jira/browse/FELIX-881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Felix Meschberger resolved FELIX-881.
-------------------------------------
Resolution: Fixed
Applied fixes in Rev. 734634 and 734635: The service reference is now to be
retrieved using a getServiceReference() method which guards against the case
where the service registration is already null. In addition the service
registration field is cleared before the service is unregistered to prevent an
IllegalStateExcetion in the getServiceReference() method in extreme cases,
where the field is not null but the service has already been unregistered.
> Stopping the Configuration Admin bundle causes a NullPointerException
> ---------------------------------------------------------------------
>
> Key: FELIX-881
> URL: https://issues.apache.org/jira/browse/FELIX-881
> Project: Felix
> Issue Type: Bug
> Components: Configuration Admin
> Affects Versions: configadmin-1.0.6
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Priority: Blocker
> Fix For: configadmin-1.0.8
>
>
> When the Configuration Admin bundle is stopped a message is logged, which
> causes a NullPointerException:
> ERROR: Error stopping bundle. (java.lang.NullPointerException)
> java.lang.NullPointerException
> at
> org.apache.felix.cm.impl.ConfigurationManager.log(ConfigurationManager.java:777)
> at org.apache.felix.cm.impl.UpdateThread.schedule(UpdateThread.java:113)
> at
> org.apache.felix.cm.impl.UpdateThread.terminate(UpdateThread.java:104)
> at
> org.apache.felix.cm.impl.ConfigurationManager.stop(ConfigurationManager.java:215)
> at
> org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:611)
> at org.apache.felix.framework.Felix._stopBundle(Felix.java:2047)
> at org.apache.felix.framework.Felix.stopBundle(Felix.java:2004)
> at
> org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:1188)
> at
> org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:265)
> at java.lang.Thread.run(Thread.java:613)
> ERROR: Error stopping
> file:/XXX/.m2/repository/org/apache/felix/org.apache.felix.configadmin/1.0.6/org.apache.felix.configadmin-1.0.6.jar
> (org.osgi.framework.BundleException: Activator stop error in bundle
> org.apache.felix.configadmin [30].)
> java.lang.NullPointerException
> at
> org.apache.felix.cm.impl.ConfigurationManager.log(ConfigurationManager.java:777)
> at org.apache.felix.cm.impl.UpdateThread.schedule(UpdateThread.java:113)
> at
> org.apache.felix.cm.impl.UpdateThread.terminate(UpdateThread.java:104)
> at
> org.apache.felix.cm.impl.ConfigurationManager.stop(ConfigurationManager.java:215)
> at
> org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:611)
> at org.apache.felix.framework.Felix._stopBundle(Felix.java:2047)
> at org.apache.felix.framework.Felix.stopBundle(Felix.java:2004)
> at
> org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:1188)
> at
> org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:265)
> at java.lang.Thread.run(Thread.java:613)
> This is caused by the log method calling getReference() on the
> configurationAdminRegistration field which has already been set to null
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.