Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
-
commons-configuration-1.3-dev
Description
There is a different behaviour locating the configuration file in classpath depending on the way it is set in the configuration class.
For example assuming "conf/conf1.properties" exists in classpath:
PropertiesConfiguration pc = new PropertiesConfiguration("conf/conf1.properties");
gives org.apache.commons.configuration.ConfigurationException: Cannot locate configuration source conf1.properties
while
PropertiesConfiguration pc = new PropertiesConfiguration();
pc.setFileName("conf/conf1.properties");
pc.load();
properly locate file in classpath and loads it.