Uploaded image for project: 'Commons Configuration'
  1. Commons Configuration
  2. CONFIGURATION-379

org.apache.commons.configuration.ConfigurationException: Cannot locate configuration source null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Invalid
    • 1.4
    • None
    • None
    • None
    • Windows XP, Tomcat 5.5 server, Quarts 1.6.0

    Description

      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(AbstractFileConfiguration.java:213)
      at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:193)
      at com.mycomp.myapp.CIMConfiguration.configure(CIMConfiguration.java:104)
      at com.mycomp.myapp.CIMConfiguration.configure(CIMConfiguration.java:89)
      at com.mycomp.myapp.InterfaceJob.execute(InterfaceJob.java:64)
      at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)

      To my understanding, this error is reported from
      Class: AbstractFileConfiguration.java
      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            ranbsing ranbir singh
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: