Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat not starting from eclipse

Tags:

eclipse

tomcat

I'm trying to start tomcat server 6.0.32 (NOT MY APP) from eclipse but it fails with error "Server Apache Tomcat v6.0.32 at localhost failed to start". But when I'm starting it with startup.bat it is ok. I checked all ports for tomcat - they are free. Here it is a console log

11.08.2011 15:15:46 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: <MY_PATH_VARIABLE>
11.08.2011 15:15:47 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
11.08.2011 15:15:47 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1068 ms
11.08.2011 15:15:47 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
11.08.2011 15:15:47 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
11.08.2011 15:15:47 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor ProjectName.xml

Maybe someone know how to fix it?((((

like image 593
Matv Avatar asked Aug 11 '11 12:08

Matv


2 Answers

I had the same problem i.e. no errors in any of the logs, and the server started fine when launched from the command line using run.sh. However as soon as I used Eclipse (without or without my app) Tomcat wouldn't start at all.

I solved this problem by performing the following steps:

  1. In Eclipse, go to the 'Servers' tab.
  2. Double click the server.
  3. A configuration overview should be displayed in the main Eclipse panel.
  4. Under the sub-section 'Server Locations', select the radio button 'Use Tomcat Installation' (for me this was the middle radio button).
  5. Save the configuration (you should be prompted to do so anyway).
  6. Restart your server, and you should find localhost:8080 works from within the Eclipse browser.
like image 58
Jack Avatar answered Oct 21 '22 22:10

Jack


In Eclipse, go to:

Window -> Preferences -> Server -> Runtime Environments

And add Apache Tomcat.

Hope this helps.

like image 45
AndroidHustle Avatar answered Oct 21 '22 23:10

AndroidHustle