commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 25459] New: - [Configuration] Documentation Issue
Date Thu, 11 Dec 2003 21:54:08 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25459>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25459

[Configuration] Documentation Issue

           Summary: [Configuration] Documentation Issue
           Product: Commons
           Version: unspecified
          Platform: Other
               URL: http://jakarta.apache.org/commons/sandbox/configuration/
                    examples.html
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Sandbox
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: timreilly@spherion.com


I think there's an error in the documentation for commons-configuration 
examples page.
If I use this example:
   ConfigurationFactory factory = new ConfigurationFactory();
   URL configURL = getClass().getResource("/config.xml");
   factory.setConfigurationFileName(configURL.toString());
   Configuration config = factory.getConfiguration();

I get a NPE, but if I change to this:
  ConfigurationFactory factory = new ConfigurationFactory();
  URL configURL = getClass().getResource("/config.xml");
- factory.setConfigurationFileName(configURL.toString());
+ factory.setConfigurationFileName(configURL.getFile());
  Configuration config = factory.getConfiguration();

everthing is fine. Basically, the setConfigFileName in ConfigurationFactory is 
not expecting a URI its expecting a path i think?

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


Mime
View raw message