You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2006/03/20 17:12:53 UTC
DO NOT REPLY [Bug 39037] New: - Illegal character ' ' in toolsJar URL is not escaped
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39037>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39037
Summary: Illegal character ' ' in toolsJar URL is not escaped
Product: Ant
Version: 1.7Alpha (nightly)
Platform: Other
OS/Version: Windows XP
Status: NEW
Severity: major
Priority: P2
Component: Core
AssignedTo: dev@ant.apache.org
ReportedBy: svetozar01@hotmail.com
Used nightly build: ant_20060320114020.tar.gz
This is the exception I received while building:
java.lang.IllegalArgumentException
at java.net.URI.create(URI.java:842)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
va:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.launch.Locator.fromURI(Locator.java:160)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:265)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:96)
Caused by: java.net.URISyntaxException: Illegal character in path at index 16:
file:/C:/Program Files/Java/jdk1.5.0_06/lib/tools.jar
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 java.net.URI.create(URI.java:840)
... 7 more
-----------------------------------------
Fix:
Change line 251 in file Launcher.java from
jars[jars.length - 1] = toolsJar.toURL();
to
jars[jars.length - 1] = toolsJar.toURI().toURL();
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 39037] - Illegal character ' ' in toolsJar URL is not escaped
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39037>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39037
peterreilly@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution| |DUPLICATE
------- Additional Comments From peterreilly@apache.org 2006-05-03 16:54 -------
Yep, this is the same bug.
*** This bug has been marked as a duplicate of 39295 ***
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 39037] - Illegal character ' ' in toolsJar URL is not escaped
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39037>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39037
------- Additional Comments From william.barker@wilshire.com 2006-03-26 03:06 -------
(In reply to comment #1)
> I can work around it by building Ant with a 1.3.1 JVM. For a 1.4+ JVM, a
> better patch is to in Locator.fromURI(String), simply swallow (or log) the
> IllegalArgumentException, and continue on trying the 1.3 logic. This builds
> Ant successfully as well.
Ok, I take it back. To get a working Ant that will work with 1.4+, it isn't
enough to build with 1.3.1. The path to Locator.fromURI is needed as well.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 39037] - Illegal character ' ' in toolsJar URL is not escaped
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39037>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39037
------- Additional Comments From william.barker@wilshire.com 2006-03-27 03:08 -------
Created an attachment (id=17991)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=17991&action=view)
Patch to fall-back to the 1.3 logic if the URI is invalid
Ok, now I'm just being annoying ;-).
This patch gives you a buildable and working version of Ant, even when using
Windows with %ANT_HOME% is on a path with a ' ' in it.
Strangely, simply using encodeUri doesn't work, but I wasn't interested enough
to look into why.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 39037] - Illegal character ' ' in toolsJar URL is not escaped
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39037>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39037
gudnabrsam@yahoo.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
------- Additional Comments From gudnabrsam@yahoo.com 2006-05-03 16:38 -------
There have been a number of revisions in this area recently. Can anyone verify
whether this works on a build from svn HEAD?
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 39037] - Illegal character ' ' in toolsJar URL is not escaped
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39037>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39037
jglick@netbeans.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jglick@netbeans.org
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 39037] - Illegal character ' ' in toolsJar URL is not escaped
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39037>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39037
------- Additional Comments From william.barker@wilshire.com 2006-03-25 23:43 -------
I just hit this one as well. It also occurs if you co Ant into a location
that has a ' ' in the path (common enough under Windows :). To fix this case
with the patch in #0, you would also need to apply it to
Locator.getLocationURLs, and anyplace else that File.toURL is called. Not
very pretty :(.
I can work around it by building Ant with a 1.3.1 JVM. For a 1.4+ JVM, a
better patch is to in Locator.fromURI(String), simply swallow (or log) the
IllegalArgumentException, and continue on trying the 1.3 logic. This builds
Ant successfully as well.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org