You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Robert Munteanu (JIRA)" <ji...@apache.org> on 2016/11/21 14:40:58 UTC

[jira] [Commented] (SLING-6313) Sling installer can duplicate factory configurations if an invalid RegisteredResourceList.ser is found

    [ https://issues.apache.org/jira/browse/SLING-6313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15683733#comment-15683733 ] 

Robert Munteanu commented on SLING-6313:
----------------------------------------

There is code that attempts to prevent duplicate configurations to be created, but it fails for configuration factory "instances" created from the provisioning model. The key difference here is that the provisioning model allows to specify configs with "friendly" qualifiers, e.g. org.apache.felix.jaas.Configuration.factory-*GuestLoginModule*, but on the other hand the config admin replaces that config pid with an actual UUID - org.apache.felix.jaas.Configuration.factory.*150bc928-25e8-4c2e-b210-89331344b3a5*.

One possible solution is to retain the original alias as a configuration property. But I'll dig a bit more and see if this is the correct fix.

> Sling installer can duplicate factory configurations if an invalid RegisteredResourceList.ser is found
> ------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-6313
>                 URL: https://issues.apache.org/jira/browse/SLING-6313
>             Project: Sling
>          Issue Type: Bug
>          Components: Installer
>            Reporter: Robert Munteanu
>            Assignee: Robert Munteanu
>             Fix For: Installer Core 3.8.2
>
>
> Steps to reproduce, inside `launchpad/builder`
> {noformat}
> mvn clean package
> java -jar target/org.apache.sling.launchpad-9-SNAPSHOT.jar
> # wait for Sling to start up properly, stop it with CTRL-C
> truncate --size=-1 sling/installer/RegisteredResourceList.ser
> java -jar target/org.apache.sling.launchpad-9-SNAPSHOT.jar
> # wait for Sling to start up properly, stop it with CTRL-C
> java -jar target/org.apache.sling.launchpad-9-SNAPSHOT.jar
> {noformat}
> The following exceptions are logged in the last run:
> {noformat}21.11.2016 14:32:26.538 *ERROR* [CM Configuration Updater (ManagedServiceFactory Update: factoryPid=[org.apache.sling.commons.log.LogManager.factory.config])] org.apache.felix.configadmin Service [org.apache.felix.cm.ConfigurationAdmin,28, [org.osgi.service.cm.ConfigurationAdmin]] [org.osgi.service.cm.ManagedServiceFactory, id=19, bundle=8/slinginstall:org.apache.sling.commons.log-5.0.1-SNAPSHOT.jar]: Updating property org.apache.sling.commons.log.names of configuration org.apache.sling.commons.log.LogManager.factory.config.b4cf7982-9af0-40a1-b720-3e83a9f9e7f9 caused a problem: Category log.request already defined by configuration org.apache.sling.commons.log.LogManager.factory.config.b4cf7982-9af0-40a1-b720-3e83a9f9e7f9 (org.osgi.service.cm.ConfigurationException: org.apache.sling.commons.log.names : Category log.request already defined by configuration org.apache.sling.commons.log.LogManager.factory.config.b4cf7982-9af0-40a1-b720-3e83a9f9e7f9)
> org.osgi.service.cm.ConfigurationException: org.apache.sling.commons.log.names : Category log.request already defined by configuration org.apache.sling.commons.log.LogManager.factory.config.b4cf7982-9af0-40a1-b720-3e83a9f9e7f9
> 	at org.apache.sling.commons.log.logback.internal.config.LoggerManagedServiceFactory.updated(LoggerManagedServiceFactory.java:36)
> 	at org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.updated(ManagedServiceFactoryTracker.java:159)
> 	at org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.provideConfiguration(ManagedServiceFactoryTracker.java:93)
> 	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.provide(ConfigurationManager.java:1611)
> 	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.run(ConfigurationManager.java:1554)
> 	at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141)
> 	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109)
> 	at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.sling.commons.log.logback.internal.config.ConfigurationException: 
> 	at org.apache.sling.commons.log.logback.internal.LogConfigManager.updateLoggerConfiguration(LogConfigManager.java:533)
> 	at org.apache.sling.commons.log.logback.internal.config.LoggerManagedServiceFactory.updated(LoggerManagedServiceFactory.java:34)
> 	... 7 common frames omitted{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)