Details
Description
The problem is we have own ConfigAdmin services which are initialized with null Dictionary configuration object (in the OSGi spec the NULL value is allowed).
The problem the JsonInstaller always assumes that the configuration.getProcessedProperties always returns with existing instance of Dictionary.
Dictionary<String, Object> dictionary = configuration.getProcessedProperties(null); File file = null; if (dictionary.get(DirectoryWatcher.FILENAME) != null) { file = getCfgFileFromProperty(configuration.getProperties().get(DirectoryWatcher.FILENAME)); }
So there is a lot of exception in our case
15:41:57.424 WARN [CM Event Dispatcher (Fire ConfigurationEvent: pid=hu.blackbelt.judo.services.dispatcher.DefaultDispatcher.ed3c4b4a-3527-40c7-a2db-a2e0fb770767)] Can't update json configuration file java.lang.NullPointerException at org.apache.karaf.config.core.impl.JsonConfigInstaller.configurationEvent(JsonConfigInstaller.java:136) at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:1720) at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1662) at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:122) at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:84) at java.base/java.lang.Thread.run(Thread.java:834) 15:41:57.425 WARN [CM Event Dispatcher (Fire ConfigurationEvent: pid=hu.blackbelt.judo.services.dispatcher.DefaultIdentifierSigner.3c2f8f9d-c343-4c5f-a52b-91fd34d21095)] Can't update json configuration file java.lang.NullPointerException at org.apache.karaf.config.core.impl.JsonConfigInstaller.configurationEvent(JsonConfigInstaller.java:136) at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:1720) at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1662) at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:122) at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:84) at java.base/java.lang.Thread.run(Thread.java:834) 15:41:57.425 WARN [CM Event Dispatcher (Fire ConfigurationEvent: pid=hu.blackbelt.judo.services.dispatcher.DefaultActorResolver.23aeaa8c-85d2-439c-84a6-3d2c3e12e7ab)] Can't update json configuration file java.lang.NullPointerException at org.apache.karaf.config.core.impl.JsonConfigInstaller.configurationEvent(JsonConfigInstaller.java:136) at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:1720) at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1662) at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:122) at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:84) at java.base/java.lang.Thread.run(Thread.java:834)