Bug 112560 - ConfigRegistry unable to load property config files due to malformed URL created in getConfigURL()
ConfigRegistry unable to load property config files due to malformed URL crea...
Status: CLOSED WORKSFORME
Product: Red Hat Web Application Framework
Classification: Retired
Component: other (Show other bugs)
nightly
All Linux
medium Severity high
: ---
: ---
Assigned To: Dennis Gregorovic
Jon Orris
:
Depends On:
Blocks: 106481
  Show dependency treegraph
 
Reported: 2003-12-22 16:19 EST by Brett Prucha
Modified: 2007-04-18 13:00 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-12-26 10:19:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Brett Prucha 2003-12-22 16:19:20 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Description of problem:
In my Win32 environment I have ccm.home="C:\Program 
Files\eclipse\workspace\ccm-core-6.1.0.AUTO.12.13.2003-2\core". The 
function getConfigURL() of com.arsdigita.packaging.ConfigRegistry 
returns an invalid URL using this ccm home.  The URL looks for the 
file using FTP from host "C".  According to the url primer pointed to 
from Sun's URL JavaDoc 
("http://archive.ncsa.uiuc.edu/SDG/Software/Mosaic/Demo/url-
primer.html") file:// uses the ftp protocal and not the local file 
system.  Changing the URL to "file:/" works.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
Try and load the config file from a Win32 system

Additional info:
Comment 1 Richard Li 2003-12-23 10:59:30 EST
Changing the URL to file:/ breaks ConfigRegistry on Linux.

file:// should be correct because System.getProperty("ccm.home")
returns a value that has a prefix slash, which translates the URL to
file:///, which translates into the file protocol.
Comment 2 Brett Prucha 2003-12-23 11:13:33 EST
Yes, System.getProperty("ccm.home") returns a value that has a prefix 
slash if you are running under a unix system but if you are running 
under Win32 it's going to be [Drive]:\path\to\ccm\home.  So under 
windows the URL is file://[Drive]:\path\to\ccm\home which gets 
translated to get using FTP from server [Drive] the 
file "\path\to\ccm\home".  Also what happens on unix if ccm home is 
not an absolute path but relative to the working directory?  My guess 
is that it will break.
Comment 3 Brett Prucha 2003-12-23 11:28:01 EST
I just tested file:///[Drive]:\path\to\ccm\home and it works as 
well.  The solution looks like ccm.home has to be the full path 
location and if it doesn't start with "/" add it.
Comment 4 Richard Li 2003-12-23 15:41:17 EST
Good catch. The fix appears to make the Windows ccm-run script set
ccm.home with the full path.
Comment 5 Dennis Gregorovic 2003-12-23 17:47:01 EST
I checked in a fix to ConfigRegistry.  Unfortunately, I don't have
access to a Windows box at the moment.  Please let me know if the fix
works for you.

Note You need to log in before you can comment on or make changes to this bug.