简体   繁体   English

Eclipse无法在调试模式下启动tomcat-7服务器

[英]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. 我正在尝试调试我的代码,eclipse没有在调试模式下说明,但它在正常启动时工作正常。

Below is the exception I got in eclipse popup : 以下是我在eclipse弹出窗口中获得的异常:

Server Tomcat v7.0 Server at localhost was unable to start within 90 seconds. localhost上的服务器Tomcat v7.0服务器无法在90秒内启动。 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. 仅适用于Eclipse。

Menu---> Run---> Skip all Breakpoints 菜单--->运行--->跳过所有断点

Now you can start your tomcat server easily. 现在您可以轻松启动tomcat服务器了。

Happy learning, happy coding http://www.oliverspost.com/ for more information 快乐学习,快乐编码http://www.oliverspost.com/获取更多信息

There are multiple reason for not starting tomcat in debug mode in eclipse. 在eclipse中没有在调试模式下启动tomcat的原因有很多。 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. 如果您使用的是Window操作系统,请首先检查您的窗口防火墙特殊入站规则。 If it contains javaTM in list then enable rule if it is disable and select enable connection and click on apply and ok. 如果它包含列表中的javaTM,则启用规则(如果禁用)并选择启用连接并单击“应用”和“确定”。

  2. Check your eclipse preference jre and tomcat runtime configuration. 检查您的eclipse首选项jre和tomcat运行时配置。 JDK path is more preferable. JDK路径更优选。

  3. Increase timeout if require 如果需要,增加超时

  4. Before you start the server, check process in task manager or for mac user check activity monitor. 在启动服务器之前,请检查任务管理器中的进程或mac用户检查活动监视器。 java process need to be kill if it is running. 如果java进程正在运行,则需要将其杀死。

  5. Restart eclipse and clean build and debug. 重启eclipse并清理构建和调试。 If issue still persist then take new instance of eclipse. 如果问题仍然存在,那么请采用eclipse的新实例。 some time eclipse internal setting also restrict tomcat debug mode. 一段时间eclipse内部设置也限制了tomcat调试模式。

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. 通常,当我们经常从git中拔出时会发生这种情况。

Restarting the tomcat couple times fixed it for me. 重新启动tomcat几次为我修复了它。 在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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