ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Zahra" <li...@zguy.com>
Subject Exception from ant ProcessDestroyer
Date Wed, 03 Mar 2004 03:51:24 GMT
I am running a server and a test harness in parallel from ant. ant is dieing
after the build complete message when it attempts to kill off the process
the server is running in. I have added some code to the server to allow the
test harness to request it to shutdown, but this looks like a bug in ant to
me.

Is there some way around this so I don't have to modify my server, or should
I submit a bug?

In my build.xml file:
<target name="testqh" depends="compile"
   description="Test QueryHandler">

    <parallel threadcount="2">
        <!-- run the server -->
        <daemons>
            <java classname="queryhandler.QueryHandler"
                    classpath="${build.home}/classes"
                    classpathref="compile.classpath"
                    fork="true"
                    output="testqh.server.output"
                    error="testqh.server.error">
                <arg line="8123" />
            </java>
        </daemons>

        <!-- run the test harness -->
        <junit printsummary="on" fork="yes" haltonfailure="yes">
          <formatter type="plain"/>
         <classpath refid="compile.classpath"/>
         <classpath>
            <pathelement location="${build.home}/classes" />
         </classpath>
         <test name="queryhandler.TestQueryHandler"/>
        </junit>
    </parallel>
</target>

At the end of the ant run:
BUILD SUCCESSFUL
Total time: 13 seconds
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:494)
        at
org.apache.tools.ant.taskdefs.ProcessDestroyer.removeShutdownHook(Pro
cessDestroyer.java:116)
        at
org.apache.tools.ant.taskdefs.ProcessDestroyer.remove(ProcessDestroye
r.java:186)
        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:495)
        at org.apache.tools.ant.taskdefs.Java.fork(Java.java:702)
        at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:161)
        at org.apache.tools.ant.taskdefs.Java.execute(Java.java:77)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at
org.apache.tools.ant.taskdefs.Parallel$TaskRunnable.run(Parallel.java
:420)
        at java.lang.Thread.run(Thread.java:566)
Caused by: java.lang.IllegalStateException: Shutdown in progress
        at java.lang.Shutdown.remove(Shutdown.java:104)
        at java.lang.Runtime.removeShutdownHook(Runtime.java:218)
        ... 14 more
     [java] Java Result: 143

---
Andrew Zahra
Wollongong, NSW
Australia


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message