commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Muldoon" <...@firstbest.com>
Subject RE: [Configuration] getList returns an empty list if the underlying configuration file is touched
Date Thu, 13 Dec 2007 13:45:49 GMT
Updating to Commons Configuration 1.5 does address the issue in that the
new "supportUpdates" feature associated with the configurationAt
operation gives me what I need.  With that said, I should clarify that
the issue occurs in a subnode configuration (I just didn't realize that
that was significant prior to your email Oliver) and that both getString
and getList operations failed after updating the underlying
configuration file. And FWIW, the getString operation that I mentioned
was succeeding (in my previous message) was performed against the parent
configuration.   Anyway, it's now working as required (with
"supportUpdates" set to true).

Thanks, Tom

-----Original Message-----
From: Oliver Heger [mailto:oliver.heger@oliver-heger.de] 
Sent: Wednesday, December 05, 2007 3:40 PM
To: Jakarta Commons Users List
Subject: Re: [Configuration] getList returns an empty list if the
underlying configuration file is touched

Tom Muldoon wrote:
>  
> Hi,
>  
> I'm running into a problem in which the getList operation returns an 
> empty List if and when the underlying configuration file is updated (I

> am leveraging the FileChangedReloadingStrategy). I am using Commons 
> Configuration 1.4 with the DefaultConfigurationBuilder in conjunction 
> with the XPathExpressionEngine. Please note, other operations, 
> getString for example, work fine.
>  
> Here's an excerpt from my configuration.xml file ...
>  
>     <xml fileName="retroplan-config.xml" config-name="retroplan"
> config-optional="true" throwExceptionOnMissing="false">
>         <reloadingStrategy refreshDelay="1000"
> config-class="org.apache.commons.configuration.reloading.FileChangedRe
> lo
> adingStrategy"/>
>     </xml>
>  
> So, with that said, are there known issues with the 1.4 implementation

> of the FileChangedReloadingStrategy and/or the getList operation that 
> would explain this behavior?
>  
> Thanks, Tom

There are no open issues with getList() and FileChangedReloadingStrategy
I am aware of.


At first I would like to ask you to update to Commons Configuration 1.5,

which has been released recently. Don't know whether this will help, but

just in case.

If the problem persists, I need some more information to reproduce it:

- A code fragment demonstrating how you access the configuration.
- A fragment of the configuration file with the properties you try to 
access.
- In which way is the configuration file changed on disk? Was the key 
you try to access just added?
- What happens if you pass the key you use for getList() into 
getString() or some other method? (In this case the first element of the

list should be returned.)
- Does getList() work after getString() was called?

Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message