Skip to content
This repository has been archived by the owner on May 28, 2018. It is now read-only.

AnnotatedClassScanner URI error - Illegal character in path #318

Closed
glassfishrobot opened this issue Mar 14, 2008 · 4 comments
Closed

AnnotatedClassScanner URI error - Illegal character in path #318

glassfishrobot opened this issue Mar 14, 2008 · 4 comments

Comments

@glassfishrobot
Copy link

com.sun.ws.rest.impl.container.config.AnnotatedClassScanner fails whenresource
and provider classes are loaded via an URLClassLoader with whitespace characters
in the URLs.

Snipped trace:

java.lang.IllegalArgumentException
at java.net.URI.create(Unknown Source)
at
com.sun.ws.rest.impl.container.config.AnnotatedClassScanner.index(AnnotatedClassScanner.java:204)
at
com.sun.ws.rest.impl.container.config.AnnotatedClassScanner.scan(AnnotatedClassScanner.java:113)
at
com.sun.ws.rest.api.core.PackagesResourceConfig.init(PackagesResourceConfig.java:90)
Caused by: java.net.URISyntaxException: Illegal character in path at index 28:
file:/C:/work/workspace/Mule 1.4.3
eval/lib/mule-rest-demo.jar!/com/censored/mule/demo/rest
at java.net.URI$Parser.fail(Unknown Source)
at java.net.URI$Parser.checkChars(Unknown Source)
at java.net.URI$Parser.parseHierarchical(Unknown Source)
at java.net.URI$Parser.parse(Unknown Source)
at java.net.URI.(Unknown Source)

Line 205 of AnnotatedClassScanner (revision 867) reads:

URI jarUri = URI.create(u.getSchemeSpecificPart());

Which fails as escaped characters are decoded. Should probably be:

URI jarUri = URI.create(u.getRawSchemeSpecificPart());

Environment

Operating System: All
Platform: All

@glassfishrobot
Copy link
Author

Reported by dbaluca@java.net

@glassfishrobot
Copy link
Author

japod@java.net said:
Nice catch! Thank you a lot!

Fixed in the main trunk.

@glassfishrobot
Copy link
Author

Marked as fixed on Sunday, March 16th 2008, 7:44:15 pm

@glassfishrobot
Copy link
Author

This issue was imported from java.net JIRA JERSEY-46

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants