Unable to Start Tomcat 7.0 in Eclipse Indigo

27,908

Solution 1

Just follow the Simple Steps

Double click on your desired server in the server-view , It will open the window and Right corner of the Window Timout option is availble and change time to 120 . it will work :)

Solution 2

For me the cause was Eclipse. Running the IDE with the '-clean' parameter solved it.

eclipse.exe -clean

Solution 3

Verify the deployment-descriptor and check the value for <url-pattern>. This can be stopping tomcat to load.

Solution 4

Eclipse WTP usually tries to make sure that the web app is up by visiting the default page (/) of the app when you start the server. Until it gets an HTTP 200 (OK) response from that page - it thinks the app is not up. You are probably noticing the server icon (where you start tomcat from) still says "starting" with a green blinking.

I think Eclipse has a bug where it cannot handle a bunch of 302 on the page at / - which could happen if that page was redirecting to another page which was again redirecting to a login page.

Solution 5

SOLVED: That's it!!!! For me was compiling with JDK6 but running Tomcat with JDK7, WST uses the system properties and not the eclipse settings. I also configure the same JDK Version in eclipse and in System (check it with java -version in cmd line)

Details: I try to configure eclipse like describe here, but it didn´t solve the problem, then I notice in eclipse´s error log that tomcat was started with jre 1.7. in spite of my configurations.

I also try, in cmd line, 'java -version' and obtained '1.7' instead of expected '1.6'.

I also decide to configure java 1.6 (like in eclipse) in system panel but it didn´t solve the problem. I also desinstall jre 1.7 restart eclipse AND IT SUCCESS!.. It was a very usefull clue, thank you.

Share:
27,908
Ahmed Faisal
Author by

Ahmed Faisal

Making sense of open source platforms...

Updated on November 21, 2020

Comments

  • Ahmed Faisal
    Ahmed Faisal over 3 years

    I've to start working on a web-app project for which I've Eclipse Indigo and Tomcat 7.0 installed. The environment also has JRE 7, Android SDK in it. But whenever I start the server, it gets timed out!

    Moreover, I'm able to start the server outside Eclipse and sucessfully execute a web app in the browser. But to debug, I would rather have it in Eclipse.

    The error message is:

    Server Tomcat v7.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.
    

    In the console I get:

        Mar 14, 2012 11:51:18 PM 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: C:\program files\Java\jre7\bin;C:\WINNT\Sun\Java\bin;C:\WINNT\system32;C:\WINNT;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\oracle\product\11.1.0\BIN\;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Executive Software\Diskeeper\;C:\Program Files\Pointsec\Pointsec Media Encryption\Program\;C:\Program Files\Windows Imaging\;C:\oracle\product\11.1.0\BIN;C:\Program Files\Reflection\;C:\eclipse;;.
    Mar 14, 2012 11:51:18 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:AUDI_ASSIST_v2.0_WS_REDESIGN_Interceptor' did not find a matching property.
    Mar 14, 2012 11:51:18 PM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["http-bio-9080"]
    Mar 14, 2012 11:51:18 PM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["ajp-bio-9009"]
    Mar 14, 2012 11:51:18 PM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 504 ms
    Mar 14, 2012 11:51:18 PM org.apache.catalina.core.StandardService startInternal
    INFO: Starting service Catalina
    Mar 14, 2012 11:51:18 PM org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/7.0.26
    Mar 14, 2012 11:51:18 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
    INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [109] milliseconds.
    Mar 14, 2012 11:51:18 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
    INFO: validateJarFile(D:\documents and settings\fahmf\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\AUDI_ASSIST_v2.0_WS_REDESIGN_Interceptor\WEB-INF\lib\com.ibm.ws.webservices.thinclient_7.0.0.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    Mar 14, 2012 11:51:20 PM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["http-bio-9080"]
    Mar 14, 2012 11:51:20 PM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["ajp-bio-9009"]
    Mar 14, 2012 11:51:20 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 1697 ms
    

    I have tried the solutions proposed in other questions on this forum like increasing the time out period,changing the port numbers, uninstalling & reinstalling Tomcat, changing the 'publisiing' option for the server but nothing seems to work.

    Any help would be sincerely appreciated. Thanks in advance...