Eclipse 未在调试模式下启动 tomcat-7 服务器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/28981101/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse not starting tomcat-7 server in debug mode
提问by Shamim Ahmad
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. If the server requires more time, try increasing the timeout in the server editor.
Server Tomcat v7.0 Server at localhost 无法在 90 秒内启动。如果服务器需要更多时间,请尝试在服务器编辑器中增加超时时间。
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.
请帮我解决这个问题。
回答by Trisno Raynaldy
Removing all breakpoints fixed my case
删除所有断点修复了我的情况
回答by Oliver Queen
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/了解更多
回答by Narendra Rabari
There are multiple reason for not starting tomcat in debug mode in eclipse. Below checkpoint could help you to resolve the issue.
在 Eclipse 中没有在调试模式下启动 tomcat 有多种原因。下面的检查点可以帮助您解决问题。
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.
Check your eclipse preference jre and tomcat runtime configuration. JDK path is more preferable.
Increase timeout if require
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.
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.
如果您使用的是 Window 操作系统,那么首先检查您的窗口防火墙特别是入站规则。如果列表中包含 javaTM,则启用规则(如果禁用)并选择启用连接,然后单击应用并确定。
检查您的 eclipse 首选项 jre 和 tomcat 运行时配置。JDK 路径更可取。
如果需要,增加超时
在启动服务器之前,请在任务管理器中检查进程或对于 mac 用户检查活动监视器。如果java进程正在运行,则需要将其杀死。
重新启动 eclipse 并清理构建和调试。如果问题仍然存在,则采用新的 eclipse 实例。有时 Eclipse 内部设置也限制了 tomcat 调试模式。
回答by Isidro.rn
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.
我不知道参数的类型是否重要,但这是我第一次遇到这种情况。
回答by Sunil Chauhan
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 中拉取时会发生这种情况。