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 175769 - URISyntaxException: Illegal character in path at index 67: http://plugins.netbeans.org/nbpluginportal/files/nbms/18954_RelaxNg File Support (NetBeans 6.7.1).nbm
Summary: URISyntaxException: Illegal character in path at index 67: http://plugins.net...
Status: RESOLVED FIXED
Alias: None
Product: updatecenters
Classification: Unclassified
Component: Pluginportal (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jiri Kovalsky
URL:
Keywords:
: 178408 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-10-30 13:15 UTC by Jesse Glick
Modified: 2011-05-06 13:33 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2009-10-30 13:15:44 UTC
Found this in my log file:

java.net.URISyntaxException: Illegal character in path at index 67:
http://plugins.netbeans.org/nbpluginportal/files/nbms/18954_RelaxNg File Support (NetBeans 6.7.1).nbm
	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.modules.autoupdate.updateprovider.AutoupdateCatalogParser.getDistribution(AutoupdateCatalogParser.java:578)
....
	at org.netbeans.modules.autoupdate.ui.Utilities.showProviderNotification(Utilities.java:542)
[catch] at org.netbeans.modules.autoupdate.ui.actions.AutoupdateCheckScheduler$7.run(AutoupdateCheckScheduler.java:448)

I guess something is failing to escape file names used in URIs. Consider using e.g.

new URI(null, relpath, null).getRawPath()
Comment 1 Jiri Kovalsky 2009-11-27 04:14:54 UTC
Michale, does Jesse's suggestion sound good to you?
Comment 2 Jesse Glick 2009-12-23 08:26:23 UTC
It's been a month, and dozens of these exceptions appear in everyone's log file - no progress?
Comment 3 Jesse Glick 2010-03-09 09:43:38 UTC
Does this component have an owner?
Comment 4 Jiri Kovalsky 2010-03-09 14:01:33 UTC
Is this a problem of incorrectly generated Plugin Portal catalogue or a defect in Plugins manager?
Comment 5 Jesse Glick 2010-03-09 14:17:14 UTC
Incorrect catalog. Example entry:

distribution="http://plugins.netbeans.org/nbpluginportal/files/nbms/18954_RelaxNg File Support (NetBeans 6.7.1).nbm"

This is not a valid URL.
Comment 6 Jiri Kovalsky 2010-03-11 10:02:36 UTC
Dmitry, do you think you could implement Jesse's suggestion? If a URISyntaxException is hit, try the new URI(null, relpath, null).getRawPath() to see if the URI class will convert the illegal characters correctly. Thanks for your reply.
Comment 7 Jiri Kovalsky 2010-03-11 10:08:29 UTC
Dmitry, do you think you could implement Jesse's suggestion? If a URISyntaxException is hit, try the new URI(null, relpath, null).getRawPath() to see if the URI class will convert the illegal characters correctly. Thanks for your reply.
Comment 8 Jesse Glick 2010-03-11 10:21:17 UTC
The filename should be encoded unconditionally, there is no need to wait for a URISyntaxException; there could be URIs which are well-formed but incorrect: e.g. if a file 100%FeelsGreat.nbm is encountered, http://.../100%FeelsGreat.nbm might be a valid URL but it points to something other than what was intended.

I can't say what exactly the code should do since (as far as I know) I do not have access to the server source code.
Comment 9 Jesse Glick 2011-01-14 15:17:17 UTC
*** Bug 178408 has been marked as a duplicate of this bug. ***
Comment 10 Jan Pirek 2011-05-06 13:33:06 UTC
I updated the pluginportal code so the filenames are now url encoded so there should not be any illegal things like spaces...