commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Goers (JIRA)" <>
Subject [jira] Commented: (CONFIGURATION-379) org.apache.commons.configuration.ConfigurationException: Cannot locate configuration source null
Date Wed, 01 Apr 2009 06:37:13 GMT


Ralph Goers commented on CONFIGURATION-379:

First, this really isn't a problem with Commons Configuration so you should close this issue.

As to how to solve it, there are a number of ways depending on what you are trying to do.
Since you are getting the file name from a system property It appears that you are only dealing
with a single property file. The file should be read when CIMSystem.init is called, so I really
don't know why the configure method is being called again in the execute method. 

OTOH, if it was intended that each execution should have its own properties configuration
then system.getConfiguration should really return a new CIMConfiguration.

If you have further questions I would suggest posting on the dev list.

> org.apache.commons.configuration.ConfigurationException: Cannot locate configuration
source null
> ------------------------------------------------------------------------------------------------
>                 Key: CONFIGURATION-379
>                 URL:
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.4
>         Environment: Windows XP, Tomcat 5.5 server, Quarts 1.6.0
>            Reporter: ranbir singh
>            Priority: Critical
> In one of my projects, we are using commons-configuration to read properties file.  There
are multiple threads that are trying to read property in this property file and many times
fails giving following exception:
> org.apache.commons.configuration.ConfigurationException: Cannot locate configuration
source null
> 	at org.apache.commons.configuration.AbstractFileConfiguration.load(
> 	at org.apache.commons.configuration.AbstractFileConfiguration.load(
> 	at com.mycomp.myapp.CIMConfiguration.configure(
> 	at com.mycomp.myapp.CIMConfiguration.configure(
> 	at com.mycomp.myapp.InterfaceJob.execute(
> 	at
> 	at org.quartz.simpl.SimpleThreadPool$
> To my understanding, this error is reported from
> Class:
> Method: load(String fileName) throws ConfigurationException
> {
>       URL url = ConfigurationUtils.locate(basePath, fileName);
>       if (url == null)
>       {
>              throw new ConfigurationException("Cannot locate configuration source " +
fileName); } 
>             load(url);
>       }
> I have checked& printed that the filename passed to this method is correct.
> Please advice

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message