ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: Tomcat start/stop tasks don't work for Tomcat 5.5
Date Tue, 29 Mar 2005 12:18:46 GMT
The stacktrace shows that the Ant task tries to open a socket connection to
Tomcat.
So it should be possible to run Ant and Tomcat on different JVMs. Ant
requires at least
1.2 (dont know what the Tomcat tasks need). Same for Tomcat - I dont know.
But that should
be described in Tomcats install notes.

Sure about the port?


Jan

> -----Ursprüngliche Nachricht-----
> Von: David [mailto:achepati67@yahoo.es]
> Gesendet am: Dienstag, 29. März 2005 14:15
> An: Ant Apache User Group
> Betreff: 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(AbstractC
> atalinaTask.java:261)
>  at 
> org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractC
> atalinaTask.java: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(HttpU
> RLConnection.java:521)
>  at 
> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLCon
> nection.java:498)
>  at 
> org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractC
> atalinaTask.java: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(HttpU
> RLConnection.java:521)
>  at 
> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLCon
> nection.java:498)
>  at 
> org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractC
> atalinaTask.java:202)
>  at 
> org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractC
> atalinaTask.java: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! 
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message