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.<clinit>(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.<clinit>(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 <[EMAIL PROTECTED]>
To: Ant Users List <user@ant.apache.org>
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.


<project name="proxytest" default="test">
  <target name="test">
    <mkdir dir="src"/>
    <concat destfile="src/Test.java">
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();
        }
    }
}
    </concat>
    <property name="classes" location="build/classes"/>
    <mkdir dir="${classes}"/>
    <javac srcdir="src" destdir="${classes}" debug="yes"/>
    <java fork="yes" classpath="${classes}"
          classname="Test"/>
  </target>
</project>



On 12/8/06, Jonah Beckford <[EMAIL PROTECTED]> 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.<clinit>(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.<clinit>(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.<clinit>(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.<clinit>(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 <[EMAIL PROTECTED]>
> To: Ant Users List <user@ant.apache.org>
> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>
> > 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
> > <project name="Problem Example" default="problem" basedir=".">
> >         <target name="problem">
> >
> >                         dest="bsh-2.0b4.jar"/>
> >         </target>
> > </project>
> >
> > /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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to