ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Mishkin <>
Subject Using Ant to start tomcat and run cactus tests
Date Tue, 10 May 2005 14:32:17 GMT
Has anyone gotten this to work?  I am fairly skilled with ant and tried
various solutions from the web and the cactus website.  Currently I am
utilizing the following to attempt to start tomcat:


<target name="tomcat-start">
         <!-- Start Tomcat -->
        <java classname="org.apache.catalina.startup.Bootstrap" fork="yes">
                <jvmarg value="-Dcatalina.home=${tomcat.home}"/>
                <jvmarg value="-Dcatalina.base=${tomcat.home}/webapps"/>
                <arg value="start"/>
                  <fileset dir="${tomcat.home}">
                      <include name="bin/bootstrap.jar"/>


The message ANT returns is 'Can't Load Server.xml'

Can't load server.xml
Can't load server.xml
May 10, 2005 9:27:35 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 0 ms
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.lang.reflect.Method.invoke(
	at org.apache.catalina.startup.Bootstrap.start(
	at org.apache.catalina.startup.Bootstrap.main(
Caused by: java.lang.NullPointerException
	at org.apache.catalina.startup.Catalina.await(
	at org.apache.catalina.startup.Catalina.start(
	... 6 more

Ideas would be appreciated or tips on getting cactus tests integrated into a


-----Original Message-----
From: Daniele Gianni [] 
Sent: Thursday, May 05, 2005 3:48 AM
To: Ant Users List
Subject: Re: Installing Ant under Windows XP

Dear Conor,

thanks for your suggestions. This is what I gets executing ant.bat 
having commented out the first line (@echo off), unfortunately this is 
still not obvious for me so if you have an further suggestions I will 
appreciate it very much.

The message "unexpected software" is shown after the command: if not "" 
== "" goto runAntWithJikes. At any rate, I have copied all the text below.


C:\Documents and Settings>REM  Copyright 2001,2004 The Apache Software 

C:\Documents and Settings>REM

C:\Documents and Settings>REM  Licensed under the Apache License, 
Version 2.0 (the "License");

C:\Documents and Settings>REM  you may not use this file except in 
compliance with the License.

C:\Documents and Settings>REM  You may obtain a copy of the License at

C:\Documents and Settings>REM

C:\Documents and Settings>REM

C:\Documents and Settings>REM

C:\Documents and Settings>REM  Unless required by applicable law or 
agreed to in writing, software

C:\Documents and Settings>REM  distributed under the License is 
distributed on an "AS IS" BASIS,

KIND, either express or implied.

C:\Documents and Settings>REM  See the License for the specific language 
governing permissions and

C:\Documents and Settings>REM  limitations under the License.

C:\Documents and Settings>if exist "\antrc_pre.bat" call "\antrc_pre.bat"

C:\Documents and Settings>if "Windows_NT" == "Windows_NT"

C:\Documents and Settings>rem C:\Programmi\apache-ant-1.6.2\bin\ is 
expanded pathname of the current

script under NT

C:\Documents and Settings>set 

C:\Documents and Settings>if "C:\Programmi\apache-ant-1.6.2" == "" set


C:\Documents and Settings>set DEFAULT_ANT_HOME=

C:\Documents and Settings>rem Slurp the command line arguments. This 
loop allows for an unlimited number

C:\Documents and Settings>rem of arguments (up to the command line 
limit, anyway).

C:\Documents and Settings>set ANT_CMD_LINE_ARGS=

C:\Documents and Settings>if """" == """" goto doneStart

C:\Documents and Settings>rem find ANT_HOME if it does not exist due to 
either an invalid value passed

C:\Documents and Settings>rem by the user or the ant problem on Windows 9x

C:\Documents and Settings>if exist 
"C:\Programmi\apache-ant-1.6.2\lib\ant.jar" goto checkJava

C:\Documents and Settings>set _JAVACMD=

C:\Documents and Settings>if "C:\j2sdk1.4.2_05" == "" goto noJavaHome

C:\Documents and Settings>if not exist "C:\j2sdk1.4.2_05\bin\java.exe" 
goto noJavaHome

C:\Documents and Settings>if "" == "" set 

C:\Documents and Settings>goto checkJikes

C:\Documents and Settings>if not "" == "" goto runAntWithJikes
Unexpected Software
C:\Documents and Settings>if not 

F:\gianni\progetti\temp;"C:\Programmi\Apache Software Foundation\Tomcat

5.0\webapps\ROOT\webbasedsim\WEB-INF""=="" goto runAntWithClasspath

Conor MacNeill wrote:

> I doubt building from source will solve your problems.
> To solve these sorts of problems, one thing you should try is to 
> comment out the first line of ant.bat (the "@echo off" line). You can 
> then see what the ant batch file is doing and where it is failing.
> Try that. If it is not obvious from that, try copying the output and 
> sending it to the list.
> Also another thing to check is whether you have a CLASSPATH 
> environment variable and whether it has any quotes in it. If it has, 
> remove them.
> Conor
> Daniele Gianni wrote:
>> Thanks to everyone for your efforts but it still seems not to work.
>> I may try building it from source, do you think I can work around 
>> these problems building it from source?
>> Thanks again,
>> Daniele
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message