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 58106 - JAR files in WAR's subfolder with space throw java.net.URISyntaxException
Summary: JAR files in WAR's subfolder with space throw java.net.URISyntaxException
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 4.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jiri Skrivanek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-20 15:58 UTC by zikmund
Modified: 2008-12-22 11:36 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
java.net.URISyntaxException: Illegal character in opaque part at index 178: jar:file:/D:/NetBeans/Web%20App/dist/Web%20App.war!/WEB-INF/classes/J2EE 1.4/servlet-api-2.4.jar (2.26 KB, text/plain)
2005-04-20 16:08 UTC, zikmund
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zikmund 2005-04-20 15:58:17 UTC
Build 200504200735

1) Create new WebApp
2) Have a JAR file in this structure:
  LibraryName
    +-SubName
      +-file.jar
2) Project's Properties | Libraries | Add JAR/Folder -> add 'LibraryName' directory
3) Build project
4) Go to Files window and explore:
  project node | dist | project.war file | WEB-INF | classes
5) Explore 'SubName' directory
6) EXCEPTION:
see attachment.

Note:
- Exploring WEB-INF/lib or WEB-INF/classes directory in WAR file doesn't throw
exception for any JAR file directly contained in this directory.
- Described structure of directories with JAR files are not typical for WebApps,
therefore setting priority to P4.
Comment 1 zikmund 2005-04-20 16:08:02 UTC
Created attachment 21775 [details]
java.net.URISyntaxException: Illegal character in opaque part at index 178: jar:file:/D:/NetBeans/Web%20App/dist/Web%20App.war!/WEB-INF/classes/J2EE 1.4/servlet-api-2.4.jar
Comment 2 zikmund 2005-04-20 16:13:12 UTC
Improtant note: 'SubName' has to contain a space in the name (e.g. "Struts
1.1"). That's the reason why the exception is thrown.
Comment 3 rmatous 2005-09-22 16:28:20 UTC
Tomas, please could you look at it ? Do we intend to support embeded jars into
jar in methods like FileUtil.isArchiveFile, getArchiveRoot and so on ? If so,
what then should be return e.g.  from this call FileUtil.isArchiveFile(new
URL("jar:jar...")).  
Comment 4 Tomas Zezula 2005-09-23 07:52:31 UTC
For the classpath related things it is not necessary to support the nested
archives, But I cannot evaluate the web app use case since I don't understand to
the content of the war files.
If we want to support it, the FU.isArchiveFile ("jar:file://xxxxx!/yyy") should
return false and FU.isArchiveFile ("jar:file://xxxxx!/yyy.jar") should return
true. Not sure.
Comment 5 martinb 2005-12-04 19:50:41 UTC
this also goes wrong when clicking extended help ( globe-with-window-in-front 
icon)
( I confirm that the requested does exist)

java.net.URISyntaxException: Illegal character in path at index 16: 
file:/C:/Program Files/netbeans-5.0beta2/enterprise2/docs/jstl11-doc.zip
	at java.net.URI$Parser.fail(URI.java:2809)
	at java.net.URI$Parser.checkChars(URI.java:2982)
	at java.net.URI$Parser.parseHierarchical(URI.java:3066)
	at java.net.URI$Parser.parse(URI.java:3014)
	at java.net.URI.<init>(URI.java:578)
	at org.netbeans.core.startup.layers.ArchiveURLMapper.getFileObjects
(ArchiveURLMapper.java:84)
	at org.openide.filesystems.URLMapper.findFileObject(URLMapper.java:190)
	at org.netbeans.modules.extbrowser.URLUtil.createExternalURL
(URLUtil.java:63)
	at 
org.netbeans.modules.extbrowser.NbDdeBrowserImpl$URLDisplayer.dispatchURL
(NbDdeBrowserImpl.java:276)
	at org.netbeans.modules.extbrowser.NbDdeBrowserImpl$URLDisplayer.run
(NbDdeBrowserImpl.java:253)
[catch] at java.lang.Thread.run(Thread.java:595)
Comment 6 _ rkubacki 2006-11-30 16:13:19 UTC
Probably it is no longer a problem. at least I cannot reproduce in trunk when
exploring content of war or zip file that contain entries with space in name.
Comment 7 Antonin Nebuzelsky 2008-04-15 17:04:08 UTC
Reassigning to new module owner jskrivanek.
Comment 8 Jiri Skrivanek 2008-11-21 12:25:03 UTC
Works for rkubacki.