In Karaf 2.2.2 I was able to edit one property in a configuration without
affecting the others.  For example, I have a configuration in karaf/etc with
file name of Query_Service-ID1234.cfg that has the following properties: 
id = ABC123 
queryUrl = http://123.45.67.89/query
maximumResults = 10 
failOnError = false 

If I wanted to change the configuration property "maximumResults" from 10 to
500, in 2.2.2 I could run the following command in the Karaf console: 
config:edit Query_Service-ID1234; config:propset maximumResults 500;
config:update 

That command would just update the value of "maximumResults."   

When I run this same command in Karaf 2.2.5, it successfully updates the
"maximumResults" property, but it removes all other properties from my
configuration and the resulting Query_Service-ID1234.cfg file looks like
this: 
maximumResults = 500 

All other properties were removed.   

What is the recommended way to update a single value in my configuration
from the command line?   

In an attempt to get the behavior I wanted I tried running the above command
with a -f argument to reference the file name instead of the PID since I am
using a managed service factory to create instances of "Query_Service."
 This worked on Unix from the Karaf command line.  However, this did not
work on Windows.   I get the following error: "Could not find configuration
with file install property set to: Query_Service-ID1234."  I have verified
that the file "Query_Service-ID1234.cfg" is in karaf/etc. 
The command I ran was: 
config:edit -f Query_Service-ID1234; config:propset maximumResults 500;
config:update 

Thanks for you help.

--
View this message in context: 
http://karaf.922171.n3.nabble.com/Config-propset-clears-other-configuration-properties-not-specified-in-command-tp3878004p3878004.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to