commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Noordermeer <>
Subject [configuration] Basepath not set with DefaultConfigurationBuilder/ConfigurationBuilderProvider
Date Thu, 24 Feb 2011 15:04:46 GMT

I've an issue with the DefaultConfigurationBuilder, and I'm wondering if 
I'm doing something wrong or if it's a bug.

I've the following structure:


I use a DefaultConfigurationBuilder, with the following contents in the 

   	<properties fileName="../"/>
   	<configuration fileName="def-2.xml"/>

I use this code:

DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
Configuration c = builder.getConfiguration(true);

This gives an exception:

Caused by: org.apache.commons.configuration.ConfigurationException: 
Cannot locate configuration source def-2.xml

Seems to be that AbstractFileConfiguration.basePath is not set by the 
DefaultConfigurationBuilder.ConfigurationBuilderProvider, while it is 
set by DefaultConfigurationBuilder.FileConfigurationProvider (in 
initBeanInstance(Object, BeanDeclaration)).

Is this a bug, or am I doing something wrong and is it not possible/is 
there an other way to include files which are not in the current working 
dir in a DefaultConfigurationBuilder XML.



Mike Noordermeer

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message