From user-return-59001-apmail-ant-user-archive=ant.apache.org@ant.apache.org Fri Dec 08 23:22:47 2006 Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 5702 invoked from network); 8 Dec 2006 23:22:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Dec 2006 23:22:47 -0000 Received: (qmail 27104 invoked by uid 500); 8 Dec 2006 23:22:50 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 26785 invoked by uid 500); 8 Dec 2006 23:22:49 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 26774 invoked by uid 99); 8 Dec 2006 23:22:49 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Dec 2006 15:22:49 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [192.6.10.2] (HELO colossus.hpl.hp.com) (192.6.10.2) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Dec 2006 15:22:34 -0800 Received: from localhost (localhost.localdomain [127.0.0.1]) by colossus.hpl.hp.com (Postfix) with ESMTP id 5E8E86B9D5 for ; Fri, 8 Dec 2006 23:22:12 +0000 (GMT) X-Virus-Scanned: amavisd-new at hplb.hpl.hp.com Received: from colossus.hpl.hp.com ([127.0.0.1]) by localhost (colossus.hpl.hp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id leuhhd8zLKiF for ; Fri, 8 Dec 2006 23:22:08 +0000 (GMT) Received: from ha-node-br1.hpl.hp.com (ha-node-br1.hpl.hp.com [16.25.144.56]) by colossus.hpl.hp.com (Postfix) with ESMTP id A67866B9D2 for ; Fri, 8 Dec 2006 23:22:07 +0000 (GMT) Received: from [16.27.193.111] ([16.27.193.111]) by ha-node-br1.hpl.hp.com (8.13.4/8.13.4) with ESMTP id kB8NLp3r011409 for ; Fri, 8 Dec 2006 23:21:51 GMT Message-ID: <4579F388.7040801@apache.org> Date: Fri, 08 Dec 2006 23:21:44 +0000 From: Steve Loughran User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: Ant Users List Subject: Re: 1.7.0RC1 on IBM JDK 1.5 References: <20061208231008.39230.qmail@web37014.mail.mud.yahoo.com> In-Reply-To: <20061208231008.39230.qmail@web37014.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HPL-MailScanner-Information: Please contact the ISP for more information X-HPL-MailScanner: Found to be clean X-HPL-MailScanner-From: stevel@apache.org X-Virus-Checked: Checked by ClamAV on apache.org Jonah Beckford wrote: > Yes Peter, the same problem occurs. I'll move this problem outside of Ant where it belongs. > > Thanks for the quick resolution. Jonah Always glad to find a bug in someone else's code. Actually this shows why we are probably going to pull the -proxy stuff. it helps some people from having to config their ANT_OPTS, but for a small group of different people it causes their builds to fail in wierd ways that it never used to. Having ant1.7 not set up the proxy is backwards compatible and seemingly more stable. > > /tmp/example2 $ java -classpath build/classes Test > java.lang.UnsatisfiedLinkError: sun/net/spi/DefaultProxySelector.init()Z > at sun.net.spi.DefaultProxySelector.(DefaultProxySelector.java:93) > at java.lang.J9VMInternals.initializeImpl(Native Method) > at java.lang.J9VMInternals.initialize(J9VMInternals.java:177) > at java.lang.Class.forNameImpl(Native Method) > at java.lang.Class.forName(Class.java:127) > at java.net.ProxySelector.(ProxySelector.java:66) > at java.lang.J9VMInternals.initializeImpl(Native Method) > at java.lang.J9VMInternals.initialize(J9VMInternals.java:177) > at sun.net.www.protocol.http.HttpURLConnection$5.run(HttpURLConnection.java:763) > at java.security.AccessController.doPrivileged(AccessController.java:193) > at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:759) > at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:699) > at Test.run(Test.java:10) > at Test.main(Test.java:14) > > ----- Original Message ---- > From: Peter Reilly > To: Ant Users List > Sent: Friday, December 8, 2006 3:03:15 PM > Subject: Re: 1.7.0RC1 on IBM JDK 1.5 > > Great, now try the to cause the problem at the > command line: > >> java -classpath build/classes Test > > You should get the same problem. > > If this is the case, you should report the problem > to ibm. > > As regards ant1.7.0 and the default setting of java.net.useSystemProxies, > the ant dev team are having discussions on whether to > set it or not. It seems to only work correctly on windows. > > Peter > > > > On 12/8/06, Jonah Beckford wrote: >> Thanks. Here is what I get (yes, it did throw the exception): >> >> /tmp/example2 $ /tmp/ant/bin/ant -verbose >> Apache Ant version 1.7.0RC1 compiled on December 8 2006 >> Buildfile: build.xml >> Detected Java version: 1.5 in: /usr/java5_64/jre >> Detected OS: AIX >> parsing buildfile /tmp/example2/build.xml with URI = file:/tmp/example2/build.xml >> Project base dir set to: /tmp/example2 >> Build sequence for target(s) `test' is [test] >> Complete build sequence is [test, ] >> >> test: >> [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found. >> [mkdir] Created dir: /tmp/example2/src >> [concat] Concating string " >> [concat] import java.net.*; >> [concat] import java.io.*; >> [concat] >> [concat] public class Test { >> [concat] public void run() throws Exception { >> [concat] System.setProperty("java.net.useSystemProxies", "true"); >> [concat] URL source = new URL("http://ant.apache.org/";); >> [concat] URLConnection connection = source.openConnection(); >> [concat] connection.connect(); >> [concat] } >> [concat] public static void main(String[] args) { >> [concat] try { >> [concat] new Test().run(); >> [concat] } catch (Throwable t) { >> [concat] t.printStackTrace(); >> [concat] } >> [concat] } >> [concat] } >> [concat] " >> [mkdir] Created dir: /tmp/example2/build/classes >> [javac] Test.java added as Test.class doesn't exist. >> [javac] Compiling 1 source file to /tmp/example2/build/classes >> [javac] Using modern compiler >> [javac] Compilation arguments: >> [javac] '-d' >> [javac] '/tmp/example2/build/classes' >> [javac] '-classpath' >> [javac] '/tmp/example2/build/classes:/tmp/ant/lib/ant-launcher.jar:/tmp/ant/lib/ant-jmf.jar:/tmp/ant/lib/ant-junit.jar:/tmp/ant/lib/ant-swing.jar:/tmp/ant/lib/ant-trax.jar:/tmp/ant/lib/xercesImpl.jar:/tmp/ant/lib/ant.jar:/tmp/ant/lib/xml-apis.jar:/tmp/ant/lib/ant-nodeps.jar:/tmp/ant/lib/ant-testutil.jar:/usr/java5_64/lib/tools.jar' >> [javac] '-sourcepath' >> [javac] '/tmp/example2/src' >> [javac] '-g' >> [javac] >> [javac] The ' characters around the executable and arguments are >> [javac] not part of the command. >> [javac] File to be compiled: >> [javac] /tmp/example2/src/Test.java >> [java] Executing '/usr/java5_64/jre/bin/java' with arguments: >> [java] '-classpath' >> [java] '/tmp/example2/build/classes' >> [java] 'Test' >> [java] >> [java] The ' characters around the executable and arguments are >> [java] not part of the command. >> [java] java.lang.UnsatisfiedLinkError: sun/net/spi/DefaultProxySelector.init()Z >> [java] at sun.net.spi.DefaultProxySelector.(DefaultProxySelector.java:93) >> [java] at java.lang.J9VMInternals.initializeImpl(Native Method) >> [java] at java.lang.J9VMInternals.initialize(J9VMInternals.java:177) >> [java] at java.lang.Class.forNameImpl(Native Method) >> [java] at java.lang.Class.forName(Class.java:127) >> [java] at java.net.ProxySelector.(ProxySelector.java:66) >> [java] at java.lang.J9VMInternals.initializeImpl(Native Method) >> [java] at java.lang.J9VMInternals.initialize(J9VMInternals.java:177) >> [java] at sun.net.www.protocol.http.HttpURLConnection$5.run(HttpURLConnection.java:763) >> [java] at java.security.AccessController.doPrivileged(AccessController.java:193) >> [java] at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:759) >> [java] at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:699) >> [java] at Test.run(Test.java:10) >> [java] at Test.main(Test.java:14) >> >> BUILD SUCCESSFUL >> Total time: 2 seconds >> >> >> ----- Original Message ---- >> From: Peter Reilly >> To: Ant Users List >> Sent: Friday, December 8, 2006 1:56:38 PM >> Subject: Re: 1.7.0RC1 on IBM JDK 1.5 >> >> Thanks, the crash happens on >> connection.connect(). >> >> Try the following build file in an empty directory: >> It should show if the problem is complelty in the ibm jdk. >> >> >> >> >> >> >> import java.net.*; >> import java.io.*; >> >> public class Test { >> public void run() throws Exception { >> System.setProperty("java.net.useSystemProxies", "true"); >> URL source = new URL("http://ant.apache.org/";;); >> URLConnection connection = source.openConnection(); >> connection.connect(); >> } >> public static void main(String[] args) { >> try { >> new Test().run(); >> } catch (Throwable t) { >> t.printStackTrace(); >> } >> } >> } >> >> >> >> >> > classname="Test"/> >> >> >> >> >> >> On 12/8/06, Jonah Beckford wrote: >>> Here it is with verbose on: >>> >>> /tmp/example $ /tmp/ant/bin/ant -verbose >>> Apache Ant version 1.7.0RC1 compiled on December 8 2006 >>> Buildfile: build.xml >>> Detected Java version: 1.5 in: /usr/java5_64/jre >>> Detected OS: AIX >>> parsing buildfile /tmp/example/build.xml with URI = file:/tmp/example/build.xml >>> Project base dir set to: /tmp/example >>> Build sequence for target(s) `problem' is [problem] >>> Complete build sequence is [problem, ] >>> >>> problem: >>> [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found. >>> [get] Getting: http://www.beanshell.org/bsh-2.0b4.jar >>> [get] To: /tmp/example/bsh-2.0b4.jar >>> >>> BUILD FAILED >>> /tmp/example/build.xml:4: java.lang.UnsatisfiedLinkError: sun/net/spi/DefaultProxySelector.init()Z >>> at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:115) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:357) >>> at org.apache.tools.ant.Target.performTasks(Target.java:385) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) >>> at org.apache.tools.ant.Project.executeTarget(Project.java:1298) >>> at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1181) >>> at org.apache.tools.ant.Main.runBuild(Main.java:698) >>> at org.apache.tools.ant.Main.startAnt(Main.java:199) >>> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:298) >>> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) >>> Caused by: java.lang.UnsatisfiedLinkError: sun/net/spi/DefaultProxySelector.init()Z >>> at sun.net.spi.DefaultProxySelector.(DefaultProxySelector.java:93) >>> at java.lang.J9VMInternals.initializeImpl(Native Method) >>> at java.lang.J9VMInternals.initialize(J9VMInternals.java:177) >>> at java.lang.Class.forNameImpl(Native Method) >>> at java.lang.Class.forName(Class.java:127) >>> at java.net.ProxySelector.(ProxySelector.java:66) >>> at java.lang.J9VMInternals.initializeImpl(Native Method) >>> at java.lang.J9VMInternals.initialize(J9VMInternals.java:177) >>> at sun.net.www.protocol.http.HttpURLConnection$5.run(HttpURLConnection.java:763) >>> at java.security.AccessController.doPrivileged(AccessController.java:193) >>> at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:759) >>> at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:699) >>> at org.apache.tools.ant.taskdefs.Get.doGet(Get.java:158) >>> at org.apache.tools.ant.taskdefs.Get.execute(Get.java:76) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) >>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke(Method.java:615) >>> at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) >>> ... 11 more >>> --- Nested Exception --- >>> java.lang.UnsatisfiedLinkError: sun/net/spi/DefaultProxySelector.init()Z >>> at sun.net.spi.DefaultProxySelector.(DefaultProxySelector.java:93) >>> at java.lang.J9VMInternals.initializeImpl(Native Method) >>> at java.lang.J9VMInternals.initialize(J9VMInternals.java:177) >>> at java.lang.Class.forNameImpl(Native Method) >>> at java.lang.Class.forName(Class.java:127) >>> at java.net.ProxySelector.(ProxySelector.java:66) >>> at java.lang.J9VMInternals.initializeImpl(Native Method) >>> at java.lang.J9VMInternals.initialize(J9VMInternals.java:177) >>> at sun.net.www.protocol.http.HttpURLConnection$5.run(HttpURLConnection.java:763) >>> at java.security.AccessController.doPrivileged(AccessController.java:193) >>> at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:759) >>> at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:699) >>> at org.apache.tools.ant.taskdefs.Get.doGet(Get.java:158) >>> at org.apache.tools.ant.taskdefs.Get.execute(Get.java:76) >>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) >>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke(Method.java:615) >>> at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) >>> at org.apache.tools.ant.Task.perform(Task.java:348) >>> at org.apache.tools.ant.Target.execute(Target.java:357) >>> at org.apache.tools.ant.Target.performTasks(Target.java:385) >>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) >>> at org.apache.tools.ant.Project.executeTarget(Project.java:1298) >>> at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) >>> at org.apache.tools.ant.Project.executeTargets(Project.java:1181) >>> at org.apache.tools.ant.Main.runBuild(Main.java:698) >>> at org.apache.tools.ant.Main.startAnt(Main.java:199) >>> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:298) >>> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) >>> >>> Total time: 0 seconds >>> >>> >>> ----- Original Message ---- >>> From: Peter Reilly >>> To: Ant Users List >>> Sent: Friday, December 8, 2006 1:25:36 PM >>> Subject: Re: 1.7.0RC1 on IBM JDK 1.5 >>> >>> Can you use ant -verbose. >>> This may give better diagnostics. >>> The problem is not the Get task, it does >>> not set proxies or use any sun class. >>> In ant 1.7.0, system proxies are set by >>> System.setProperty("java.net.useSystemProxies", "true"); >>> (in org.apache.tools.ant.util.ProxySetup called from Main) >>> using -noproxy causes this not to be called. >>> So it looks like there is some issue the ibm jdk1.5 on aix >>> when java.net.useSystemProxies is set to true. >>> >>> Peter >>> >>> >>> >>> On 12/8/06, Jonah Beckford wrote: >>>> The blank line in the build.xml is: >>>> >>>> >>>> get src="http://www.beanshell.org/bsh-2.0b4.jar";;; >>>> >>>> >>>> with a less-than symbol in front and without punctuation at the end. >>>> >>>> ----- Original Message ---- >>>> From: Jonah Beckford >>>> To: user@ant.apache.org >>>> Sent: Friday, December 8, 2006 12:32:17 PM >>>> Subject: 1.7.0RC1 on IBM JDK 1.5 >>>> >>>> Using both the 1.7.0RC1 candidate, and the latest from subversion (Dec 8 11:44AM PST), I cannot run the simple build.xml outlined at the bottom without using "-noproxy". >>>> >>>> The underlying problem seems pretty simple; the "Get" task relies on a Sun package that is not available/reliable on non-Sun JVMs. Has anybody else encountered this or is able to replicate this? My platform is IBM JDK 1.5 on AIX 5.3 with 8-way PowerPC. I think the proper thing would be that Ant 1.7 disables the proxy when it encounters this "UnsatisfiedLinkError", so that users aren't forced to specify -noproxy. >>>> >>>> Thanks. >>>> >>>> --------- >>>> >>>> /tmp/example $ cat build.xml >>>> >>>> >>>> >>>> dest="bsh-2.0b4.jar"/> >>>> >>>> >>>> >>>> /tmp/example $ /tmp/ant/bin/ant >>>> Buildfile: build.xml >>>> >>>> problem: >>>> [get] Getting: http://www.beanshell.org/bsh-2.0b4.jar >>>> [get] To: /tmp/example/bsh-2.0b4.jar >>>> >>>> BUILD FAILED >>>> /tmp/example/build.xml:4: java.lang.UnsatisfiedLinkError: sun/net/spi/DefaultProxySelector.init()Z >>>> >>>> Total time: 0 seconds >>>> >>>> /tmp/example $ /tmp/ant/bin/ant -version >>>> Apache Ant version 1.7.0RC1 compiled on December 8 2006 >>>> >>>> /tmp/example $ java -version >>>> java version "1.5.0" >>>> Java(TM) 2 Runtime Environment, Standard Edition (build pap64dev-20061003a (SR3)) >>>> IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 AIX ppc64-64 j9vmap6423-20061003 (JIT enabled) >>>> J9VM - 20060915_08260_BHdSMr >>>> JIT - 20060908_1811_r8 >>>> GC - 20060906_AA) >>>> JCL - 20061003 >>>> >>>> /tmp/example $ /tmp/ant/bin/ant -noproxy >>>> Buildfile: build.xml >>>> >>>> problem: >>>> [get] Getting: http://www.beanshell.org/bsh-2.0b4.jar >>>> [get] To: /tmp/example/bsh-2.0b4.jar >>>> >>>> BUILD SUCCESSFUL >>>> Total time: 0 seconds >>>> >>>> >>>> --------- >>>> >>>> >>>> >>>> >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >>>> For additional commands, e-mail: user-help@ant.apache.org >>>> >>>> >>>> >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >>>> For additional commands, e-mail: user-help@ant.apache.org >>>> >>>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >>> For additional commands, e-mail: user-help@ant.apache.org >>> >>> >>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >>> For additional commands, e-mail: user-help@ant.apache.org >>> >>> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >> For additional commands, e-mail: user-help@ant.apache.org >> >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >> For additional commands, e-mail: user-help@ant.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org