ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Raible <li...@raibledesigns.com>
Subject stopping tomcat with Ant 1.6
Date Wed, 04 Feb 2004 04:04:55 GMT
I have the following target to stop Tomcat in my build.xml file.

     <target name="stop.tomcat" description="stops tomcat">
         <java classname="org.apache.catalina.startup.Bootstrap"  
fork="yes">
             <jvmarg value="-Dcatalina.home=${tomcat.home}"/>
             <arg value="stop"/>
             <classpath>
                 <fileset dir="${tomcat.home}">
                     <include name="bin/bootstrap.jar"/>
                 </fileset>
             </classpath>
         </java>
     </target>

When I run my "test-cactus" target using Ant 1.5.4, it completes as  
expected:

BUILD SUCCESSFUL
Total time: 1 minute 32 seconds
foxxy:~/dev/appfuse mraible$

However, when using Ant 1.6, I get a nice long stack trace.  Any ideas  
why?  I've been able to reproduce this on Windows 2000/XP and OS X with  
JDK 1.4.2.


BUILD SUCCESSFUL
Total time: 2 minutes 2 seconds


java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at  
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav 
a:39)
         at  
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor 
Impl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at  
org.apache.tools.ant.taskdefs.ProcessDestroyer.removeShutdownHook(Proces 
sDestroyer.java:153)
         at  
org.apache.tools.ant.taskdefs.ProcessDestroyer.remove(ProcessDestroyer.j 
ava:223)
         at  
org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:526)
         at org.apache.tools.ant.taskdefs.Java.fork(Java.java:740)
         at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:199)
         at org.apache.tools.ant.taskdefs.Java.execute(Java.java:115)
         at  
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306)
         at org.apache.tools.ant.Task.perform(Task.java:401)
         at org.apache.tools.ant.Target.execute(Target.java:338)
         at org.apache.tools.ant.Target.performTasks(Target.java:365)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1237)
         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:420)
         at  
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:144)
         at  
org.apache.cactus.integration.ant.container.GenericContainer$Hook.execut 
e(GenericContainer.java:149)
         at  
org.apache.cactus.integration.ant.container.GenericContainer.startUp(Gen 
ericContainer.java:324)
         at  
org.apache.cactus.integration.ant.container.ContainerRunner$1.run(Contai 
nerRunner.java:179)
         at java.lang.Thread.run(Thread.java:552)
Caused by: java.lang.IllegalStateException: Shutdown in progress
         at java.lang.Shutdown.remove(Shutdown.java:102)
         at java.lang.Runtime.removeShutdownHook(Runtime.java:218)
         ... 21 more
      [java] Java Result: -113
foxxy:~/dev/appfuse mraible$

Thanks,

Matt


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


Mime
View raw message