[
https://issues.apache.org/jira/browse/KARAF-7255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jean-Baptiste Onofré updated KARAF-7255:
----------------------------------------
Target Version/s: 4.4.0, 4.3.4 (was: 4.3.4)
> KARAF JsonInstaller throw error on Null dictionary configuration
> ----------------------------------------------------------------
>
> Key: KARAF-7255
> URL: https://issues.apache.org/jira/browse/KARAF-7255
> Project: Karaf
> Issue Type: Bug
> Components: karaf
> Affects Versions: 4.3.3
> Environment: Karaf 4.3.3
> Reporter: Róbert Csákány
> Assignee: Jean-Baptiste Onofré
> Priority: Major
>
> 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.
>
> {code:java}
> Dictionary<String, Object> dictionary =
> configuration.getProcessedProperties(null);
> File file = null;
> if (dictionary.get(DirectoryWatcher.FILENAME) != null) {
> file =
> getCfgFileFromProperty(configuration.getProperties().get(DirectoryWatcher.FILENAME));
> }
> {code}
> So there is a lot of exception in our case
>
> {code:java}
> 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)
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)