This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 53710 - Spaces in directory names cause catalog lookups to fail.
Summary: Spaces in directory names cause catalog lookups to fail.
Alias: None
Product: xml
Classification: Unclassified
Component: Catalog (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P3 blocker with 2 votes (vote)
Assignee: Milan Kuchtiak
Depends on: 27930
  Show dependency tree
Reported: 2005-01-19 19:03 UTC by alexmilowski
Modified: 2008-02-15 22:48 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description alexmilowski 2005-01-19 19:03:41 UTC
A space in a directory name, e.g. "Documents and
Settings", causes catalog looks to fail.  If you
place the same catalog under a directory structure
without spaces, it works.

The file URL listed under 'XML Entity Catalogs' in
the 'Runtime' tab does not have the spaces escaped
Comment 1 Jiri Kovalsky 2005-02-17 14:31:56 UTC
Yes Alex is right. It still does not work in development build
#200502170805 of NetBeans 4.1. If the catalog with space in path is
mounted, its subnodes have "View" menu disabled.
Comment 2 _ pkuzel 2005-02-21 17:01:07 UTC
I cannot reproduce on my linux. It's not probably related just to
spaces. I suspect it's triggered by wrong URL normalization (":" and "
") done in 3rd party catalog impl code. 

What nane does have your catalog node? I get "Resolver at
file:/home/pk97937/bugs/is53/x710/a space in path/newXMLCatalog.xml"
that is probably wrong as it lacks proper space escaping.

Hey, I can reproduce now. Catalog location does not matter. It's
content matters. Here bundled
implementation relies with null systemID if the systemID(URI) contains

It's easily observable just look at catalog entry properties. If
System ID contains null you suffer from the provider bug.

It's defacto duplicate of issue 27930 that fixes this.
Comment 3 Jiri Kovalsky 2005-02-22 07:51:06 UTC
Yes, you are right. The value of System ID is null. I would also agree
to resolve this issue as duplicate of the #27930. Do you really plan
to fix this one in 4.1 ?
Comment 4 alexmilowski 2005-02-22 15:12:37 UTC
As the submitter of this who discovered this when I have 20 students
in masters program at UC Berkeley not able to use their catalogs, I'd
say it is really important!  They were totally confused.  They typically
put the files in "Documents and Settings" on windows and it just didn't
work.  It took a bit of sleuthing on my part as I hate spaces in 
directory names so I had never run into this problem.

Basically, on windows it is very normal to have spaces in file names and
your average user will not understand why their catalog fails to work.
Comment 5 _ pkuzel 2005-02-25 14:32:25 UTC
Now, after the resolver library upgrage, it works for: 
  uri="a space/my.dtd" 
but it does not work for: 
  uri="a+space/my.dtd" (proper systemID is returned but parser is 
not able to access it, probably known bug in URL.openStream() 
I'm going to try to write workaround to cover all space syntaxes. 
Comment 6 _ pkuzel 2005-02-25 14:54:18 UTC
FIXED, code readability and maintainability decreased but all 3 
syntaxes supported. 
Checking in 
new revision: 1.15; previous revision: 1.14 
Checking in src/org/netbeans/modules/xml/catalog/; 
new revision: 1.4; previous revision: 1.3 
Comment 7 tonybeckham 2008-02-15 22:48:59 UTC
Fix Verified:

spaces replaced w/ %20 and catalogs do not fail.

Product Version: NetBeans IDE Dev (Build 200802151203)
Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119
System: Mac OS X version 10.5.2 running on i386; MacRoman; en_US (nb)