简体   繁体   中英

Eclipse not starting tomcat-7 server in debug mode

I am trying to debug my code, the eclipse doesn't stating in debug mode, however it is working fine in normal start.

Below is the exception I got in eclipse popup :

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

When I look in to the console everything looks fine, please have a look....

INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/security/oauth/details.xml]
Mar 11, 2015 11:48:38 AM org.springframework.core.io.support.PropertiesLoaderSupport loadProperties
INFO: Loading properties file from class path resource [dev/com.myPack.plat.data.mongo.config.props/mongo-config.properties]

Please help me on this.

删除所有断点修复了我的情况

As per the solution, your main problem is that you have included breakpoint in your program. If you don't remember your breakpoint, you can skip those breakpoints during execution of your program. Follow these steps.

Only applicable for Eclipse.

Menu---> Run---> Skip all Breakpoints

Now you can start your tomcat server easily.

Happy learning, happy coding http://www.oliverspost.com/ for more information

There are multiple reason for not starting tomcat in debug mode in eclipse. Below checkpoint could help you to resolve the issue.

  1. If you are using Window operation system then first check your window firewall specially inbound rule. If it contains javaTM in list then enable rule if it is disable and select enable connection and click on apply and ok.

  2. Check your eclipse preference jre and tomcat runtime configuration. JDK path is more preferable.

  3. Increase timeout if require

  4. Before you start the server, check process in task manager or for mac user check activity monitor. java process need to be kill if it is running.

  5. Restart eclipse and clean build and debug. If issue still persist then take new instance of eclipse. some time eclipse internal setting also restrict tomcat debug mode.

Removing breakpoints also worked for me, in fact my problems started when I set a breakpoint in this sentence:

private void process(HttpServletRequest req, HttpServletResponse resp)
        throws ServletException, IOException 

I don't know if the type of the parameters matter, but it was the first time this happens to me.

Also there is one other possible solution, Just check out the breakpoints whether they are on line or parameters. i think to remove all those break points is best way to start server in debug mode.

normally this happens when we do pull frequently from git.

Restarting the tomcat couple times fixed it for me. 在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM