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)

Reply via email to