ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <adam....@cyberspaceroad.com>
Subject Re: stopping tomcat with Ant 1.6
Date Fri, 06 Feb 2004 11:12:25 GMT
Matt,
it looks like the original 'caused-by' exception might have some better 
clues in its stacktrace - it has only shown 2 or 3 lines.


Adam

On 02/04/2004 05:04 AM Matt Raible wrote:
> 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
> 
> 


-- 
ant 1.6beta1 + java 1.4.2 on Linux 2.4.20 RH9


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


Mime
View raw message