You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2010/03/01 15:48:12 UTC
DO NOT REPLY [Bug 48833] New: NPE in
https://issues.apache.org/bugzilla/show_bug.cgi?id=48833
Summary: NPE in <get>
Product: Ant
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Core tasks
AssignedTo: notifications@ant.apache.org
ReportedBy: stevel@apache.org
Seeing an NPE in <get>. clearly I'm setting up the connection string wrong, but
an NPE is overkill
[mkdir] Created dir:
/home/slo/Projects/SmartFrog/Forge/core/components/cloudfarmer/build/hadoop-config
[echo] fetching http:localhost:8081/hadoop.site.xml to
/home/slo/Projects/SmartFrog/Forge/core/components/cloudfarmer/build/hadoop-config/hadoop-site.xml
[get] Getting: http:localhost:8081/hadoop.site.xml
[get] To:
/home/slo/Projects/SmartFrog/Forge/core/components/cloudfarmer/build/hadoop-config/hadoop-site.xml
[get] Exception in thread "Thread-2" java.lang.NullPointerException
[get] at sun.net.www.ParseUtil.toURI(ParseUtil.java:261)
[get] at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:795)
[get] at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:726)
[get] at
org.apache.tools.ant.taskdefs.Get$GetThread.openConnection(Get.java:661)
[get] at
org.apache.tools.ant.taskdefs.Get$GetThread.get(Get.java:581)
[get] at
org.apache.tools.ant.taskdefs.Get$GetThread.run(Get.java:571)
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 48833] NPE in
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48833
--- Comment #1 from Steve Loughran <st...@apache.org> 2010-03-01 16:18:21 UTC ---
I thought this could be triggered by a null connection, added a check for that,
but no. This is being triggered by something in Sun's code. If you search for
NullPointerException sun.net.www.ParseUtil.toURI
you can see that we are not the only group to encounter it.
Propose: catch the exception, turn to a BuildException listing the URL at
fault.
This turns the error into (at normal levels)
build.xml:176: Failed to parse http:localhost:8081/hadoop.site.xml
which lets people debug the problem
At -verbose you get
Failed to parse http:localhost:8081/hadoop.site.xml
at org.apache.tools.ant.taskdefs.Get$GetThread.openConnection(Get.java:668)
at org.apache.tools.ant.taskdefs.Get$GetThread.get(Get.java:581)
at org.apache.tools.ant.taskdefs.Get$GetThread.run(Get.java:571)
Caused by: java.lang.NullPointerException
at sun.net.www.ParseUtil.toURI(ParseUtil.java:261)
at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:795)
at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:726)
at org.apache.tools.ant.taskdefs.Get$GetThread.openConnection(Get.java:665)
... 2 more
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 48833] NPE in
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48833
Steve Loughran <st...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|unspecified |nightly
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 48833] NPE in
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48833
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Version|nightly |1.8.0
Resolution| |FIXED
Target Milestone|--- |1.8.1
--- Comment #2 from Stefan Bodewig <bo...@apache.org> 2010-03-02 11:06:51 UTC ---
svn revision 917574
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.