[ https://issues.apache.org/jira/browse/KARAF-7389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17563711#comment-17563711 ]
Grzegorz Grzybek commented on KARAF-7389: ----------------------------------------- [~j3rem1e], referring to: {quote} The commit in this issue: # Create a new configuration without the "felix.fileinstall.filename" property # Then create the configuration file {quote} My original change for https://github.com/apache/karaf/pull/1489/files had two goals: # fileinstall getting CM_UPDATED with configuration _without_ {{felix.fileinstall.filename}} property won't process anything # writing (by FeatureConfigInstaller) a file through tmp file won't trigger fileinstall that could process (it happened to me) not-fully-written file I never checked this problem with factory PIDs though. {quote} It tries to find the configuration by filename : https://github.com/apache/felix-dev/blob/master/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java#L505 {quote} Looks like the file is written by Karaf without {{felix.fileinstall.filename}} property - maybe we should just add: {code:java} props.put(FILEINSTALL_FILE_NAME, cfgFile.getAbsoluteFile().toURI().toString()); {code} before calling {{updateStorage(cid, props, false);}}? > Problem installing features with embedded config > ------------------------------------------------ > > Key: KARAF-7389 > URL: https://issues.apache.org/jira/browse/KARAF-7389 > Project: Karaf > Issue Type: Bug > Components: karaf > Affects Versions: 4.4.0, 4.3.6, 4.2.15 > Reporter: Grzegorz Grzybek > Assignee: Jean-Baptiste Onofré > Priority: Major > > I've just seen this when installing Pax Web 8.0.1-SNAPSHOT features: > {noformat} > 2022-02-08T13:25:32,180 | INFO | > fileinstall-/data/servers/apache-karaf-4.4.0-SNAPSHOT/etc | fileinstall > | 17 - org.apache.felix.fileinstall - 3.7.4 | Updating > configuration {org.ops4j.pax.web} from > /data/servers/apache-karaf-4.4.0-SNAPSHOT/etc/org.ops4j.pax.web.cfg > 2022-02-08T13:25:32,184 | ERROR | > fileinstall-/data/servers/apache-karaf-4.4.0-SNAPSHOT/etc | fileinstall > | 17 - org.apache.felix.fileinstall - 3.7.4 | Failed to > install artifact: > /data/servers/apache-karaf-4.4.0-SNAPSHOT/etc/org.ops4j.pax.web.cfg > java.lang.RuntimeException: java.lang.IllegalArgumentException: Key [] must > not be an empty string > at > org.apache.felix.fileinstall.internal.ConfigInstaller.update0(ConfigInstaller.java:649) > ~[!/:3.7.4] > at > org.apache.felix.fileinstall.internal.ConfigInstaller.setConfig(ConfigInstaller.java:411) > ~[!/:3.7.4] > at > org.apache.felix.fileinstall.internal.ConfigInstaller.install(ConfigInstaller.java:192) > ~[!/:3.7.4] > at > org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:950) > [!/:3.7.4] > at > org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:884) > [!/:3.7.4] > at > org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:489) > [!/:3.7.4] > at > org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) > [!/:3.7.4] > at > org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) > [!/:3.7.4] > Caused by: java.lang.IllegalArgumentException: Key [] must not be an empty > string > at > org.apache.felix.cm.impl.CaseInsensitiveDictionary.checkKey(CaseInsensitiveDictionary.java:269) > ~[?:?] > at > org.apache.felix.cm.impl.CaseInsensitiveDictionary.<init>(CaseInsensitiveDictionary.java:73) > ~[?:?] > at > org.apache.felix.cm.impl.ConfigurationImpl.update(ConfigurationImpl.java:452) > ~[?:?] > at > org.apache.felix.cm.impl.ConfigurationAdapter.updateIfDifferent(ConfigurationAdapter.java:204) > ~[?:?] > at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) ~[?:?] > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > ~[?:1.8.0_312] > at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_312] > at > org.apache.felix.fileinstall.internal.ConfigInstaller.update0(ConfigInstaller.java:641) > ~[!/:3.7.4] > ... 7 more > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)