commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uma...@comcast.net
Subject Re: [Commons Configuratin]: Suppress exceptions about missing optional property files?
Date Thu, 10 Apr 2008 19:51:27 GMT

ConfigurationBuilder yields CombinedConfiguration.
I have so far based my stuff on CompositeConfiguration.
I do not see a type relationship (is-a) between the two.
How do we migrate from CompositeConfiguration to
CombinedConfiguration?

What are the risks?

Regards

/Ur

 -------------- Original message ----------------------
From: Emmanuel Bourg <ebourg@apache.org>
> Try using ConfigurationBuilder instead of ConfigurationFactory, you 
> shouldn't have this exception.
> 
> Emmanuel Bourg
> 
> 
> uma_rk@comcast.net a écrit :
> > I am using the latest commons config on JDK1.6. Is there a way
> > to suppress exceptions pertaining to missing optional property files?
> > 
> > Thanks,
> > 
> > /Ur
> > 
> > Configuration:
> >         <properties fileName="/home/jdoe/my.properties" optional="true" />
> > 
> > Exception:
> > Caused by: org.apache.commons.configuration.ConfigurationException: Cannot 
> locate configuration source /home/jdoe/my.properties
> >         at 
> org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConf
> iguration.java:215)
> >         at 
> org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConf
> iguration.java:195)
> > 
> > ---------------------------------------------------------------------
> > 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
> 


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


Mime
View raw message