ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peter.rei...@corvil.com>
Subject Re: Error shown after upgrading to v1.6.0 (from v1.5.4)
Date Tue, 23 Dec 2003 12:46:20 GMT
I can confirm this error.
Can you enter a bugzilla report for it please?

The class:

public class NoFin {
    public static void main(String[] args)  throws Exception {
        while (true) {
            Thread.sleep(1000);
        }
    }
}

With a build script:

<project default="nofin">
  <target name="nofin">
    <javac srcdir=".">
      <include name="NoFin.java"/>
    </javac>
    <java fork="yes" classname="NoFin"
          classpath="."/>
  </target>
</project>

Gives the error you have seen.

The code change in ant was in ProcessDestroyer.java revision 1.6:

Only register ProcessDestroyer when needed (and unregister it when no
longer needed).

PR: 17216
Submitted by:	James Allers <jallers at advancedreality dot com>

Peter

Gregory A. Swarthout wrote:

> I use Ant to (among other things) run a couple of programs that run 
> perpetually but have no
> shutdown method.  In Ant v1.5.4 I could use Ctrl-C to shutdown these 
> programs.  I can do the
> same thing with v1.6.0 but I always get the following error.  Is there 
> any way to suppress this
> error (and this error only) so that other users of my programs don't 
> think something abnormal
> is happening?
>
>     [java] java.lang.reflect.InvocationTargetException
>     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
>     [java]     at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>
>     [java]     at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

>
>     [java]     at java.lang.reflect.Method.invoke(Method.java:324)
>     [java]     at 
> org.apache.tools.ant.taskdefs.ProcessDestroyer.removeShutdownHook(ProcessDestroyer.java:153)

>
>     [java]     at 
> org.apache.tools.ant.taskdefs.ProcessDestroyer.remove(ProcessDestroyer.java:223) 
>
>     [java]     at 
> org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:526)
>     [java]     at org.apache.tools.ant.taskdefs.Java.fork(Java.java:740)
>     [java]     at 
> org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:199)
>     [java]     at 
> org.apache.tools.ant.taskdefs.Java.execute(Java.java:115)
>     [java]     at 
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306)
>     [java]     at org.apache.tools.ant.Task.perform(Task.java:401)
>     [java]     at org.apache.tools.ant.Target.execute(Target.java:338)
>     [java]     at 
> org.apache.tools.ant.Target.performTasks(Target.java:365)
>     [java]     at 
> org.apache.tools.ant.Project.executeTarget(Project.java:1237)
>     [java]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:420)
>     [java]     at 
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:144)
>     [java]     at 
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306)
>     [java]     at org.apache.tools.ant.Task.perform(Task.java:401)
>     [java]     at org.apache.tools.ant.Target.execute(Target.java:338)
>     [java]     at 
> org.apache.tools.ant.Target.performTasks(Target.java:365)
>     [java]     at 
> org.apache.tools.ant.Project.executeTarget(Project.java:1237)
>     [java]     at 
> org.apache.tools.ant.Project.executeTargets(Project.java:1094)
>     [java]     at org.apache.tools.ant.Main.runBuild(Main.java:669)
>     [java]     at org.apache.tools.ant.Main.startAnt(Main.java:220)
>     [java]     at 
> org.apache.tools.ant.launch.Launcher.run(Launcher.java:215)
>     [java]     at 
> org.apache.tools.ant.launch.Launcher.main(Launcher.java:90)
>     [java] Caused by: java.lang.IllegalStateException: Shutdown in 
> progress
>     [java]     at java.lang.Shutdown.remove(Shutdown.java:102)
>     [java]     at java.lang.Runtime.removeShutdownHook(Runtime.java:218)
>     [java]     ... 27 more
>     [java] Java Result: -126
>
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message