3

I have configured Tomcat Server in Eclipse Helios IDE , and started the server in Debug Mode .

This Server has already got a war file probe.war .

My question is,why this application probe.war has not been started when i started the Server from Eclipse IDE ??

This is the server console eclipse under the Eclipse IDE .

Oct 22, 2011 12:31:56 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
Oct 22, 2011 12:31:57 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Oct 22, 2011 12:31:57 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Oct 22, 2011 12:31:57 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/47  config=null
Oct 22, 2011 12:31:57 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 401 ms
Betlista
  • 10,327
  • 13
  • 69
  • 110
  • 1
    I think you've manually put the war in the `webapps` directory, but Eclipse configures a different one. Are you using [WTP](http://www.eclipse.org/webtools/)? – stivlo Oct 22 '11 at 07:26
  • Yes , you are correct , i manually put that probe.war which has not been started . How will WTP will be useful in this case ?? –  Oct 22 '11 at 08:01

1 Answers1

1

WTP offers integration between Eclipse and Tomcat, if you're not using it, you're more on your own.

As you said in the comment, you've manually placed the war file, but since you're starting Tomcat with Eclipse, the webapps directory configured by Eclipse is not the same one you're using, so your application doesn't get deployed.

To solve your problem either:

stivlo
  • 83,644
  • 31
  • 142
  • 199
  • Thanks for the answer , you provided , can you please confirm the steps i followed is correct or not . i have got project inside eclipse IDE , by running the maven script it creates a war and deployed it in tomcat webapps . I started the Tomcat server by executing the startup.exe Now inside the Eclipse IDE (Run -->DebugConfigurations --New Remote Java Appliction--> Provided the port -- , server and source . But i am getting Failed to connect to remote VM. Connection timed out. org.eclipse.jdi.TimeoutException Please tell me if this is correct or not ?? –  Oct 22 '11 at 11:18
  • 1
    And you put localhost right, have you checked if you can connect to the port with telnet? Or you've a couple of other options with Maven. Delete the project from Eclipse, including `.settings/`, `.classpath` and `.project`. From the command line you can run `mvn eclipse:eclipse`, then choose from Eclipse File, Import, General, `Existing Project into workspace`, now you can use WTP and use the simpler first option. Or install m2eclipse plugin, plus m2eclipse WTP support and after removing and cleaning the project choose Import, Maven, `Existing Maven Projects`. – stivlo Oct 22 '11 at 11:26
  • Yes i have provided the port and serer values correctly and i can connect to the http:localhost:8080 from browser . Yes before trying with Maven Plugin , i wanted to solve this . please see the screen shots http://tinypic.com/view.php?pic=262uom0&s=7 , http://tinypic.com/view.php?pic=fns743&s=7 , http://tinypic.com/view.php?pic=ymf6a&s=7 –  Oct 22 '11 at 11:42
  • before trying with Maven Plugin , just wanted to know will the above approach is corect or not ?? –  Oct 22 '11 at 11:43
  • I'm sorry the URL I gave you is not OK for your case of debugging with Tomcat 6. Let me try, I will message you back soon. – stivlo Oct 22 '11 at 11:48
  • 1
    [Try here](http://en.newinstance.it/2005/10/04/remote-debugging-tomcat-with-eclipse/). The port you've to connect to is not 8080 as you shown in the picture, but the port you specify for the debugger! – stivlo Oct 22 '11 at 13:51
  • Thanks for the link , i have done these steps , please tell me if its correct or not , I have set these inside the System Environment variables JPDA_ADDRESS 5050 JPDA_TRANSPORT dt_socket And then started in this command prompt Please see this screen shot. http://tinypic.com/view.php?pic=2hncpwh&s=7 –  Oct 22 '11 at 15:46
  • Why if the instructions tells you to run catalina, you run tomcat instead? – stivlo Oct 22 '11 at 16:10
  • Ya , i did that i am pasting the command prompt console C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin>tomcat6.exe jpda start [2011-10-22 21:11:39] [warn] No service name provided [2011-10-22 21:11:39] [error] Load configuration failed [2011-10-22 21:11:39] [error] The system could not find the environment option that was entered. [2011-10-22 21:11:39] [error] Commons Daemon procrun failed with exit value: 2 (Failed to load configuration) [2011-10-22 21:11:39] [error] The system could not find the environment option that was entered. –  Oct 22 '11 at 16:48
  • Please see this screen shot when i gave catilna , i got this error http://tinypic.com/view.php?pic=a44plk&s=7 , so i gave tomcat6 –  Oct 22 '11 at 17:12
  • I am using Tomcat6 and i have only these under the bin folder http://tinypic.com/view.php?pic=2r2yv46&s=7 –  Oct 22 '11 at 17:15
  • I've just downloaded the latest 6.x version of Tomcat for windows 64 bit to check and it's there. `$ unzip -l apache-tomcat-6.0.33-windows-x64.zip | grep catalina.bat` : `11830 2011-08-16 14:25 apache-tomcat-6.0.33/bin/catalina.bat` – stivlo Oct 22 '11 at 17:24
  • I downloaded apache-tomcat-6.0.33 and i found all those components , let me try and will let you know –  Oct 22 '11 at 17:25