[ https://issues.apache.org/jira/browse/FELIX-6103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17158146#comment-17158146 ]
Grzegorz Grzybek commented on FELIX-6103: ----------------------------------------- I wanted to run pax-web 7.3.8-SNAPSHOT tests with Karaf 4.2.9 which uses felix.fileinstall 3.6.6 and the tests failed. I checked that the problem is [this commit|https://github.com/apache/felix-dev/commit/e4131ea442a711d5996ae514dcdbfb6a6ccd0486] and in particular, this fragment: {code:java} Configuration cachedConfiguration = oldConfiguration != null ? getConfigurationAdmin().getConfiguration(oldConfiguration.getPid()) : null; {code} {{configAdmin.getConfiguration(pid)}} - the 1-arg version of {{getConfiguration()}} always calls {{org.apache.felix.cm.impl.ConfigurationImpl#setDynamicBundleLocation()}} when location is not set and in my particular test the PIDs created by Karaf features installed during pax-exam tests have location set to URI of felix.fileinstall bundle (instead of {{"?"}}) - such configuration can't be passed to pax-web-runtime bundle which sets up ManagedService for {{org.ops4j.pax.web}} PID... IMO, {{getConfiguration(pid, "?")}} should be called in the above fragment instead. [~jbonofre], [~gnodet] what do you think? > ConfigInstaller, when using NotCachablePersistenceManager, can restore cached > stale properties > ---------------------------------------------------------------------------------------------- > > Key: FELIX-6103 > URL: https://issues.apache.org/jira/browse/FELIX-6103 > Project: Felix > Issue Type: Bug > Components: File Install > Reporter: Mariano Alvaro > Assignee: Raymond Augé > Priority: Major > Fix For: fileinstall-3.6.6 > > Attachments: diffs.txt > > > When using a NotCachablePersistenceManager the following steps occur when > changing .config file values: > > # ConfigInstaller.setConfig gets called. > # Configuration gets retrieved from ConfigInstaller.getConfiguration method > # getConfigurationAdmin().listConfigurations(filter) returns a new > configuration each time because NotCacheablePersitenceManger is used. > # Changes are performed in the new Configuration. > # ConfigInstaller.doConfigurationEvent gets called back and retrieves > configuration from configurationAdmin. > # ConfigurationAdmin.getConfiguration retrieves cached value (hasn't been > updated in step 4 because a new differente configuration was returned) > # config file gets updated with cached values -- This message was sent by Atlassian Jira (v8.3.4#803005)