[JIRA] Closed: (CC-737) dashboard can't find config.properties specified with a relative path when loading config.xml

"Dan Rollo (JIRA)" <[email protected]> Mon, 25 Jul 2011 03:59:51 -0500 (CDT)
Newsgroups gmane.comp.java.cruise-control.devel
Message-ID <1923358331.1311584391484.JavaMail.jira@chidmzhosting02.thoughtworks.com>
     [ http://jira.public.thoughtworks.org/browse/CC-737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Rollo closed CC-737.
------------------------

    Fix Version/s: 2.7.2
       Resolution: Fixed

> dashboard can't find config.properties specified with a relative path when loading config.xml
> ---------------------------------------------------------------------------------------------
>
>                 Key: CC-737
>                 URL: http://jira.public.thoughtworks.org/browse/CC-737
>             Project: CruiseControl
>          Issue Type: Bug
>          Components: Reporting Application
>    Affects Versions: 2.7.1
>         Environment: CC 2.7.1, Linux
>            Reporter: Jeff Jensen
>            Priority: Critical
>             Fix For: 2.7.2
>
>
> If I specify the full path to config.xml in the Configuration File Path on the dashboard admin page, then dashboard tries to load config.xml and errors on finding the config.properties:
> root cause
> net.sourceforge.cruisecontrol.CruiseControlException: Could not load properties from file "config.properties". The file does not exist
> 	net.sourceforge.cruisecontrol.ProjectXMLHelper.registerProperty(ProjectXMLHelper.java:196)
> 	net.sourceforge.cruisecontrol.dashboard.utils.DashboardConfig.handleRootProperty(DashboardConfig.java:229)
> 	net.sourceforge.cruisecontrol.dashboard.utils.DashboardConfig.parse(DashboardConfig.java:115)
> 	net.sourceforge.cruisecontrol.dashboard.utils.DashboardConfig.<init>(DashboardConfig.java:108)
> ....snip
> root cause
> java.io.FileNotFoundException: config.properties (No such file or directory)
> 	java.io.FileInputStream.open(Native Method)
> 	java.io.FileInputStream.<init>(FileInputStream.java:106)
> 	java.io.FileReader.<init>(FileReader.java:55)
> 	net.sourceforge.cruisecontrol.ProjectXMLHelper.registerProperty(ProjectXMLHelper.java:174)
> ...snip
> This is the reference to the config.properties in my config.xml:
> <cruisecontrol>
>   <property file="config.properties" />
> ....snip
> </cruisecontrol>
> I believe dashboard fails loading it because the reference above is relative, and config.properties resides in the same dir as config.xml.  Obviously the current dir then is not the config.xml file!
> The CC process and the current reporting application work fine with it specified in this manner.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.public.thoughtworks.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide.  Store less, Store more with what you own, Move data to 
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/