ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Burgess, Benjamin" <BBurg...@tiaa-cref.org>
Subject RE: Tomcat start/stop tasks don't work for Tomcat 5.5
Date Tue, 29 Mar 2005 16:11:52 GMT
"I have installed jdk 1.4.2_07 and also java runtime 1.5 for Tomcat 5.5.
Tomcat requires at least a java runtime time 1.5."

That's not entirely true.  We use Tomcat 5.5 with jdk 1.4.2 - you just have
to get the 5.5.x Compat binary as well (available from tomcat).

Ben Burgess
TIAA-CREF

-----Original Message-----
From: David [mailto:achepati67@yahoo.es] 
Sent: Tuesday, March 29, 2005 7:15 AM
To: Ant Apache User Group
Subject: Tomcat start/stop tasks don't work for Tomcat 5.5

Dear Members,
 
I am trying to interact with the Tomcat server throught ant, it works for me
for the list command, but I can't start or stop the server.
 
I am using the following target invocation:
 
<target name = "start"
  description = "Start Tomcat application"
  >
  <start
    url         = "http://localhost:8080/manager"
    username    = "admin"
    password    = "tomcat"
    path        = "/springapp"
    />
</target>
 
I have installed jdk 1.4.2_07 and also java runtime 1.5 for Tomcat 5.5.
Tomcat requires at least a java runtime time 1.5.
 
If I execute after staring the server manually the list task it works,  but
start and stop commands don't work.
 
1. Do I have to use jdk 1.5 with Tomcat 5.5? During the Tomcat installation
I have selected a 1.5 runtime version, but I don't have installed the 1.5
jdk, I am using 1.4.2
 
2. Do I have to use a previous version of tomcat?
 
3. Is there any way to say during the ant execution that it should invoke
the tomcat tasks assuming another runtime versions?
 

 
After running this target on verbose mode I get the following output:
 
==================================================================
Detected Java version: 1.4 in: C:\Java\j2sdk\jre
Detected OS: Windows 2000
parsing buildfile P:\springapp\build.xml with URI =
file:///P:/springapp/build.xml
Project base dir set to: P:\springapp
Importing file properties.xml from P:\springapp\build.xml
parsing buildfile P:\springapp\properties.xml with URI =
file:///P:/springapp/properties.xml
 [property] Loading C:\Documents and
Settings\UF367151\springapp_build.properties
Property ${user.properties.file} has not been set
 [property] Loading P:\springapp\${user.properties.file}
 [property] Unable to find property file:
P:\springapp\${user.properties.file}
 [property] Loading P:\springapp\build.properties
Override ignored for property junit.printsummary
Override ignored for property junit.fork
Override ignored for property junit.showoutput
Override ignored for property junit.haltonfailure
Override ignored for property junit.formatter.type
Override ignored for property junit.formatter.usefile
Importing file taskdef.xml from P:\springapp\build.xml
parsing buildfile P:\springapp\taskdef.xml with URI =
file:///P:/springapp/taskdef.xml
 [property] Loading P:\springapp\messages.properties
Build sequence for target `start' is [start]
Complete build sequence is [start, undeploy, load-data, compile, build,
deploy, drop-tables, show-properties, junit-do, print-properties, install,
stop, reload, clean, usage, help, init, list, clear-data, print-data, junit,
create-tables, deploywar, ]
start:
BUILD FAILED
P:\springapp\build.xml:236: java.net.ConnectException: Connection refused:
connect
 at
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
va:261)
 at
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
va:145)
 at org.apache.catalina.ant.StartTask.execute(StartTask.java:71)
 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
 at org.apache.tools.ant.Task.perform(Task.java:364)
 at org.apache.tools.ant.Target.execute(Target.java:341)
 at org.apache.tools.ant.Target.performTasks(Target.java:369)
 at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
 at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
 at org.apache.tools.ant.Main.runBuild(Main.java:673)
 at org.apache.tools.ant.Main.startAnt(Main.java:188)
 at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
 at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Caused by: java.net.ConnectException: Connection refused: connect
 at java.net.PlainSocketImpl.socketConnect(Native Method)
 at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
 at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
 at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
 at java.net.Socket.connect(Socket.java:452)
 at java.net.Socket.connect(Socket.java:402)
 at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
 at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
 at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
 at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
 at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
 at sun.net.www.http.HttpClient.New(HttpClient.java:339)
 at sun.net.www.http.HttpClient.New(HttpClient.java:320)
 at sun.net.www.http.HttpClient.New(HttpClient.java:315)
 at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.j
ava:521)
 at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:4
98)
 at
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
va:202)
 ... 12 more
--- Nested Exception ---
java.net.ConnectException: Connection refused: connect
 at java.net.PlainSocketImpl.socketConnect(Native Method)
 at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
 at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
 at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
 at java.net.Socket.connect(Socket.java:452)
 at java.net.Socket.connect(Socket.java:402)
 at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
 at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
 at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
 at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
 at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
 at sun.net.www.http.HttpClient.New(HttpClient.java:339)
 at sun.net.www.http.HttpClient.New(HttpClient.java:320)
 at sun.net.www.http.HttpClient.New(HttpClient.java:315)
 at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.j
ava:521)
 at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:4
98)
 at
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
va:202)
 at
org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.ja
va:145)
 at org.apache.catalina.ant.StartTask.execute(StartTask.java:71)
 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
 at org.apache.tools.ant.Task.perform(Task.java:364)
 at org.apache.tools.ant.Target.execute(Target.java:341)
 at org.apache.tools.ant.Target.performTasks(Target.java:369)
 at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
 at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
 at org.apache.tools.ant.Main.runBuild(Main.java:673)
 at org.apache.tools.ant.Main.startAnt(Main.java:188)
 at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
 at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Total time: 5 seconds
====================================================================
 
Thanks,
 
David Leal

		
---------------------------------
Do you Yahoo!?
 Yahoo! Small Business - Try our new resources site! 


**************************************************************
This message, including any attachments, contains confidential information intended for a
specific individual and purpose, and is protected by law.  If you are not the intended recipient,
please contact sender immediately by reply e-mail and destroy all copies.  You are hereby
notified that any disclosure, copying, or distribution of this message, or the taking of any
action based on it, is strictly prohibited.
TIAA-CREF
**************************************************************


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


Mime
View raw message