[jira] [Closed] (KARAF-3103) config:edit does not correctly handle configuration visibility for --factory calls.
[ https://issues.apache.org/jira/browse/KARAF-3103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Richard Kaufhold closed KARAF-3103. --- Thank you. > config:edit does not correctly handle configuration visibility for --factory > calls. > --- > > Key: KARAF-3103 > URL: https://issues.apache.org/jira/browse/KARAF-3103 > Project: Karaf > Issue Type: Bug > Components: karaf-config >Affects Versions: 2.4.0, 4.0.0, 3.0.2 >Reporter: Richard Kaufhold >Assignee: Jean-Baptiste Onofré >Priority: Blocker > Fix For: 4.0.0, 3.0.2, 2.4.1 > > Attachments: patch-ConfigRepositoryImpl-visibility.txt > > Original Estimate: 10m > Remaining Estimate: 10m > > The ConfigRepositoryImpl does not specify the visibility for created factory > configurations. > I have tested it using my own ManagedServiceFactory: > Inside of the karaf shell I executed: > karaf@root()> config:edit --factory de.ansii.example.hellofactory > karaf@root()> config:property-append prop1 value1 > karaf@root()> config:update > The response was: > 2014-07-07 15:18:45,038 | ERROR | 04-24cc6aa84094) | configadmin > | 5 - org.apache.felix.configadmin - 1.6.0 | Cannot use configuration > de.ansii.example.hellofactory.5b076892-5207-4913-a704-24cc6aa84094 for > [org.osgi.service.cm.ManagedServiceFactory, id=90, > bundle=65/mvn:de.ansii.example/hellofactory]: No visibility to configuration > bound to > mvn:org.apache.karaf.config/org.apache.karaf.config.core/4.0.0-SNAPSHOT > In line 91 of > /org.apache.karaf.config.core/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java > the visibility is not specified which leads to the problem that the factory > configuration created by config:edit --factory is not usable by factory > implementations. (null is a sensible default, as in line 44) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (KARAF-3103) config:edit does not correctly handle configuration visibility for --factory calls.
[ https://issues.apache.org/jira/browse/KARAF-3103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Richard Kaufhold updated KARAF-3103: Description: The ConfigRepositoryImpl does not specify the visibility for created factory configurations. I have tested it using my own ManagedServiceFactory: Inside of the karaf shell I executed: karaf@root()> config:edit --factory de.ansii.example.hellofactory karaf@root()> config:property-append prop1 value1 karaf@root()> config:update The response was: 2014-07-07 15:18:45,038 | ERROR | 04-24cc6aa84094) | configadmin | 5 - org.apache.felix.configadmin - 1.6.0 | Cannot use configuration de.ansii.example.hellofactory.5b076892-5207-4913-a704-24cc6aa84094 for [org.osgi.service.cm.ManagedServiceFactory, id=90, bundle=65/mvn:de.ansii.example/hellofactory]: No visibility to configuration bound to mvn:org.apache.karaf.config/org.apache.karaf.config.core/4.0.0-SNAPSHOT In line 91 of /org.apache.karaf.config.core/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java the visibility is not specified which leads to the problem that the factory configuration created by config:edit --factory is not usable by factory implementations. (null is a sensible default, as in line 44) was: The ConfigRepositoryImpl does not specify the visibility for created configurations. I have tested it using my own ManagedServiceFactory: Inside of the karaf shell I executed: karaf@root()> config:edit --factory de.ansii.example.hellofactory karaf@root()> config:property-append prop1 value1 karaf@root()> config:update The response was: 2014-07-07 15:18:45,038 | ERROR | 04-24cc6aa84094) | configadmin | 5 - org.apache.felix.configadmin - 1.6.0 | Cannot use configuration de.ansii.example.hellofactory.5b076892-5207-4913-a704-24cc6aa84094 for [org.osgi.service.cm.ManagedServiceFactory, id=90, bundle=65/mvn:de.ansii.example/hellofactory]: No visibility to configuration bound to mvn:org.apache.karaf.config/org.apache.karaf.config.core/4.0.0-SNAPSHOT In line 91 of /org.apache.karaf.config.core/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java the visibility is not specified which leads to the problem that the factory configuration created by config:edit --factory is not usable by factory implementations. (null is a sensible default, as in line 44) > config:edit does not correctly handle configuration visibility for --factory > calls. > --- > > Key: KARAF-3103 > URL: https://issues.apache.org/jira/browse/KARAF-3103 > Project: Karaf > Issue Type: Bug > Components: karaf-config >Affects Versions: 4.0.0, 3.0.2 >Reporter: Richard Kaufhold > Attachments: patch-ConfigRepositoryImpl-visibility.txt > > Original Estimate: 10m > Remaining Estimate: 10m > > The ConfigRepositoryImpl does not specify the visibility for created factory > configurations. > I have tested it using my own ManagedServiceFactory: > Inside of the karaf shell I executed: > karaf@root()> config:edit --factory de.ansii.example.hellofactory > karaf@root()> config:property-append prop1 value1 > karaf@root()> config:update > The response was: > 2014-07-07 15:18:45,038 | ERROR | 04-24cc6aa84094) | configadmin > | 5 - org.apache.felix.configadmin - 1.6.0 | Cannot use configuration > de.ansii.example.hellofactory.5b076892-5207-4913-a704-24cc6aa84094 for > [org.osgi.service.cm.ManagedServiceFactory, id=90, > bundle=65/mvn:de.ansii.example/hellofactory]: No visibility to configuration > bound to > mvn:org.apache.karaf.config/org.apache.karaf.config.core/4.0.0-SNAPSHOT > In line 91 of > /org.apache.karaf.config.core/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java > the visibility is not specified which leads to the problem that the factory > configuration created by config:edit --factory is not usable by factory > implementations. (null is a sensible default, as in line 44) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (KARAF-3103) config:edit does not correctly handle configuration visibility for --factory calls.
[ https://issues.apache.org/jira/browse/KARAF-3103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Richard Kaufhold updated KARAF-3103: Description: The ConfigRepositoryImpl does not specify the visibility for created configurations. I have tested it using my own ManagedServiceFactory: Inside of the karaf shell I executed: karaf@root()> config:edit --factory de.ansii.example.hellofactory karaf@root()> config:property-append prop1 value1 karaf@root()> config:update The response was: 2014-07-07 15:18:45,038 | ERROR | 04-24cc6aa84094) | configadmin | 5 - org.apache.felix.configadmin - 1.6.0 | Cannot use configuration de.ansii.example.hellofactory.5b076892-5207-4913-a704-24cc6aa84094 for [org.osgi.service.cm.ManagedServiceFactory, id=90, bundle=65/mvn:de.ansii.example/hellofactory]: No visibility to configuration bound to mvn:org.apache.karaf.config/org.apache.karaf.config.core/4.0.0-SNAPSHOT In line 91 of /org.apache.karaf.config.core/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java the visibility is not specified which leads to the problem that the factory configuration created by config:edit --factory is not usable by factory implementations. (null is a sensible default, as in line 44) was: The ConfigRepositoryImpl does not specify the visibility for created configurations. I have tested it using my own ManagedServiceFactory: Inside of the karaf shell I executed: karaf@root()> config:edit --factory de.ansii.example.hellofactory karaf@root()> config:property-append prop1 value1 karaf@root()> config:update The response was: 2014-07-07 15:18:45,038 | ERROR | 04-24cc6aa84094) | configadmin | 5 - org.apache.felix.configadmin - 1.6.0 | Cannot use configuration de.ansii.example.hellofactory.5b076892-5207-4913-a704-24cc6aa84094 for [org.osgi.service.cm.ManagedServiceFactory, id=90, bundle=65/mvn:de.ansii.example/hellofactory]: No visibility to configuration bound to mvn:org.apache.karaf.config/org.apache.karaf.config.core/4.0.0-SNAPSHOT In line 91 of /org.apache.karaf.config.core/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java you missed to specify the visibility. (null is a sensible default, as in line 44) > config:edit does not correctly handle configuration visibility for --factory > calls. > --- > > Key: KARAF-3103 > URL: https://issues.apache.org/jira/browse/KARAF-3103 > Project: Karaf > Issue Type: Bug > Components: karaf-config >Affects Versions: 4.0.0, 3.0.2 >Reporter: Richard Kaufhold > Attachments: patch-ConfigRepositoryImpl-visibility.txt > > Original Estimate: 10m > Remaining Estimate: 10m > > The ConfigRepositoryImpl does not specify the visibility for created > configurations. > I have tested it using my own ManagedServiceFactory: > Inside of the karaf shell I executed: > karaf@root()> config:edit --factory de.ansii.example.hellofactory > karaf@root()> config:property-append prop1 value1 > karaf@root()> config:update > The response was: > 2014-07-07 15:18:45,038 | ERROR | 04-24cc6aa84094) | configadmin > | 5 - org.apache.felix.configadmin - 1.6.0 | Cannot use configuration > de.ansii.example.hellofactory.5b076892-5207-4913-a704-24cc6aa84094 for > [org.osgi.service.cm.ManagedServiceFactory, id=90, > bundle=65/mvn:de.ansii.example/hellofactory]: No visibility to configuration > bound to > mvn:org.apache.karaf.config/org.apache.karaf.config.core/4.0.0-SNAPSHOT > In line 91 of > /org.apache.karaf.config.core/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java > the visibility is not specified which leads to the problem that the factory > configuration created by config:edit --factory is not usable by factory > implementations. (null is a sensible default, as in line 44) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (KARAF-3103) config:edit does not correctly handle configuration visibility for --factory calls.
[ https://issues.apache.org/jira/browse/KARAF-3103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Richard Kaufhold updated KARAF-3103: Attachment: patch-ConfigRepositoryImpl-visibility.txt Patch to add a proper visibility to ConfigRepositoryImpl. > config:edit does not correctly handle configuration visibility for --factory > calls. > --- > > Key: KARAF-3103 > URL: https://issues.apache.org/jira/browse/KARAF-3103 > Project: Karaf > Issue Type: Bug > Components: karaf-config >Affects Versions: 4.0.0, 3.0.2 >Reporter: Richard Kaufhold > Attachments: patch-ConfigRepositoryImpl-visibility.txt > > Original Estimate: 10m > Remaining Estimate: 10m > > The ConfigRepositoryImpl does not specify the visibility for created > configurations. I have tested it using my own ManagedServiceFactory: > Inside of the karaf shell I executed: > karaf@root()> config:edit --factory de.ansii.example.hellofactory > karaf@root()> config:property-append prop1 value1 > karaf@root()> config:update > The response was: > 2014-07-07 15:18:45,038 | ERROR | 04-24cc6aa84094) | configadmin > | 5 - org.apache.felix.configadmin - 1.6.0 | Cannot use configuration > de.ansii.example.hellofactory.5b076892-5207-4913-a704-24cc6aa84094 for > [org.osgi.service.cm.ManagedServiceFactory, id=90, > bundle=65/mvn:de.ansii.example/hellofactory]: No visibility to configuration > bound to > mvn:org.apache.karaf.config/org.apache.karaf.config.core/4.0.0-SNAPSHOT > In line 91 of > /org.apache.karaf.config.core/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java > you missed to specify the visibility. (null is a sensible default, as in > line 44) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Issue Comment Deleted] (KARAF-3103) config:edit does not correctly handle configuration visibility for --factory calls.
[ https://issues.apache.org/jira/browse/KARAF-3103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Richard Kaufhold updated KARAF-3103: Comment: was deleted (was: diff --git a/config/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java b/config/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java index 11bb720..c854b62 100644 --- a/config/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java +++ b/config/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java @@ -88,7 +88,7 @@ public class ConfigRepositoryImpl implements ConfigRepository { @Override public String createFactoryConfiguration(String factoryPid, Dictionary properties) { try { - Configuration config = configAdmin.createFactoryConfiguration(factoryPid); + Configuration config = configAdmin.createFactoryConfiguration(factoryPid,null); config.update(properties); return config.getPid(); } catch (IOException e) { ) > config:edit does not correctly handle configuration visibility for --factory > calls. > --- > > Key: KARAF-3103 > URL: https://issues.apache.org/jira/browse/KARAF-3103 > Project: Karaf > Issue Type: Bug > Components: karaf-config >Affects Versions: 4.0.0, 3.0.2 >Reporter: Richard Kaufhold > Attachments: patch-ConfigRepositoryImpl-visibility.txt > > Original Estimate: 10m > Remaining Estimate: 10m > > The ConfigRepositoryImpl does not specify the visibility for created > configurations. I have tested it using my own ManagedServiceFactory: > Inside of the karaf shell I executed: > karaf@root()> config:edit --factory de.ansii.example.hellofactory > karaf@root()> config:property-append prop1 value1 > karaf@root()> config:update > The response was: > 2014-07-07 15:18:45,038 | ERROR | 04-24cc6aa84094) | configadmin > | 5 - org.apache.felix.configadmin - 1.6.0 | Cannot use configuration > de.ansii.example.hellofactory.5b076892-5207-4913-a704-24cc6aa84094 for > [org.osgi.service.cm.ManagedServiceFactory, id=90, > bundle=65/mvn:de.ansii.example/hellofactory]: No visibility to configuration > bound to > mvn:org.apache.karaf.config/org.apache.karaf.config.core/4.0.0-SNAPSHOT > In line 91 of > /org.apache.karaf.config.core/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java > you missed to specify the visibility. (null is a sensible default, as in > line 44) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KARAF-3103) config:edit does not correctly handle configuration visibility for --factory calls.
[ https://issues.apache.org/jira/browse/KARAF-3103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14053861#comment-14053861 ] Richard Kaufhold commented on KARAF-3103: - The patched version gives the expected output: 2014-07-07 18:57:41,920 | WARN | 40-f567a6c34348) | HelloManagedServiceFactory | 65 - de.ansii.example.hellofactory - 0.0.3.SNAPSHOT | Hello Managed PID de.ansii.example.hellofactory.f3b627b3-d304-49a6-b340-f567a6c34348: {service.pid=de.ansii.example.hellofactory.f3b627b3-d304-49a6-b340-f567a6c34348, prop1=value1, service.factorypid=de.ansii.example.hellofactory} > config:edit does not correctly handle configuration visibility for --factory > calls. > --- > > Key: KARAF-3103 > URL: https://issues.apache.org/jira/browse/KARAF-3103 > Project: Karaf > Issue Type: Bug > Components: karaf-config >Affects Versions: 4.0.0, 3.0.2 >Reporter: Richard Kaufhold > Original Estimate: 10m > Remaining Estimate: 10m > > The ConfigRepositoryImpl does not specify the visibility for created > configurations. I have tested it using my own ManagedServiceFactory: > Inside of the karaf shell I executed: > karaf@root()> config:edit --factory de.ansii.example.hellofactory > karaf@root()> config:property-append prop1 value1 > karaf@root()> config:update > The response was: > 2014-07-07 15:18:45,038 | ERROR | 04-24cc6aa84094) | configadmin > | 5 - org.apache.felix.configadmin - 1.6.0 | Cannot use configuration > de.ansii.example.hellofactory.5b076892-5207-4913-a704-24cc6aa84094 for > [org.osgi.service.cm.ManagedServiceFactory, id=90, > bundle=65/mvn:de.ansii.example/hellofactory]: No visibility to configuration > bound to > mvn:org.apache.karaf.config/org.apache.karaf.config.core/4.0.0-SNAPSHOT > In line 91 of > /org.apache.karaf.config.core/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java > you missed to specify the visibility. (null is a sensible default, as in > line 44) -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (KARAF-3103) config:edit does not correctly handle configuration visibility for --factory calls.
[ https://issues.apache.org/jira/browse/KARAF-3103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Richard Kaufhold updated KARAF-3103: Summary: config:edit does not correctly handle configuration visibility for --factory calls. (was: config:edit does not correctly handle --factory calls.) > config:edit does not correctly handle configuration visibility for --factory > calls. > --- > > Key: KARAF-3103 > URL: https://issues.apache.org/jira/browse/KARAF-3103 > Project: Karaf > Issue Type: Bug > Components: karaf-config >Affects Versions: 4.0.0, 3.0.2 >Reporter: Richard Kaufhold > Original Estimate: 10m > Remaining Estimate: 10m > > The ConfigRepositoryImpl does not specify the visibility for created > configurations. I have tested it using my own ManagedServiceFactory: > Inside of the karaf shell I executed: > karaf@root()> config:edit --factory de.ansii.example.hellofactory > karaf@root()> config:property-append prop1 value1 > karaf@root()> config:update > The response was: > 2014-07-07 15:18:45,038 | ERROR | 04-24cc6aa84094) | configadmin > | 5 - org.apache.felix.configadmin - 1.6.0 | Cannot use configuration > de.ansii.example.hellofactory.5b076892-5207-4913-a704-24cc6aa84094 for > [org.osgi.service.cm.ManagedServiceFactory, id=90, > bundle=65/mvn:de.ansii.example/hellofactory]: No visibility to configuration > bound to > mvn:org.apache.karaf.config/org.apache.karaf.config.core/4.0.0-SNAPSHOT > In line 91 of > /org.apache.karaf.config.core/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java > you missed to specify the visibility. (null is a sensible default, as in > line 44) -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (KARAF-3103) config:edit does not correctly handle --factory calls.
[ https://issues.apache.org/jira/browse/KARAF-3103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14053657#comment-14053657 ] Richard Kaufhold commented on KARAF-3103: - diff --git a/config/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java b/config/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java index 11bb720..c854b62 100644 --- a/config/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java +++ b/config/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java @@ -88,7 +88,7 @@ public class ConfigRepositoryImpl implements ConfigRepository { @Override public String createFactoryConfiguration(String factoryPid, Dictionary properties) { try { - Configuration config = configAdmin.createFactoryConfiguration(factoryPid); + Configuration config = configAdmin.createFactoryConfiguration(factoryPid,null); config.update(properties); return config.getPid(); } catch (IOException e) { > config:edit does not correctly handle --factory calls. > -- > > Key: KARAF-3103 > URL: https://issues.apache.org/jira/browse/KARAF-3103 > Project: Karaf > Issue Type: Bug > Components: karaf-config >Affects Versions: 4.0.0, 3.0.2 >Reporter: Richard Kaufhold > Original Estimate: 10m > Remaining Estimate: 10m > > The ConfigRepositoryImpl does not specify the visibility for created > configurations. I have tested it using my own ManagedServiceFactory: > Inside of the karaf shell I executed: > karaf@root()> config:edit --factory de.ansii.example.hellofactory > karaf@root()> config:property-append prop1 value1 > karaf@root()> config:update > The response was: > 2014-07-07 15:18:45,038 | ERROR | 04-24cc6aa84094) | configadmin > | 5 - org.apache.felix.configadmin - 1.6.0 | Cannot use configuration > de.ansii.example.hellofactory.5b076892-5207-4913-a704-24cc6aa84094 for > [org.osgi.service.cm.ManagedServiceFactory, id=90, > bundle=65/mvn:de.ansii.example/hellofactory]: No visibility to configuration > bound to > mvn:org.apache.karaf.config/org.apache.karaf.config.core/4.0.0-SNAPSHOT > In line 91 of > /org.apache.karaf.config.core/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java > you missed to specify the visibility. (null is a sensible default, as in > line 44) -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Created] (KARAF-3103) config:edit does not correctly handle --factory calls.
Richard Kaufhold created KARAF-3103: --- Summary: config:edit does not correctly handle --factory calls. Key: KARAF-3103 URL: https://issues.apache.org/jira/browse/KARAF-3103 Project: Karaf Issue Type: Bug Components: karaf-config Affects Versions: 4.0.0, 3.0.2 Reporter: Richard Kaufhold The ConfigRepositoryImpl does not specify the visibility for created configurations. I have tested it using my own ManagedServiceFactory: Inside of the karaf shell I executed: karaf@root()> config:edit --factory de.ansii.example.hellofactory karaf@root()> config:property-append prop1 value1 karaf@root()> config:update The response was: 2014-07-07 15:18:45,038 | ERROR | 04-24cc6aa84094) | configadmin | 5 - org.apache.felix.configadmin - 1.6.0 | Cannot use configuration de.ansii.example.hellofactory.5b076892-5207-4913-a704-24cc6aa84094 for [org.osgi.service.cm.ManagedServiceFactory, id=90, bundle=65/mvn:de.ansii.example/hellofactory]: No visibility to configuration bound to mvn:org.apache.karaf.config/org.apache.karaf.config.core/4.0.0-SNAPSHOT In line 91 of /org.apache.karaf.config.core/src/main/java/org/apache/karaf/config/core/impl/ConfigRepositoryImpl.java you missed to specify the visibility. (null is a sensible default, as in line 44) -- This message was sent by Atlassian JIRA (v6.2#6252)