每当我尝试使用netbeans运行/调试我的项目时,我得到以下错误
Deployment error: Starting of Tomcat failed.
See the server log for details.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:258)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:205)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:123)
at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:235)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
但是tomcat是在后台启动的。另外,当我尝试在调试模式下启动tomcat时,我得到一个"tomcat"启动失败错误,但tomcat是在后台启动的。我已经换了好几次港口,但都没有运气。我已经关闭了杀毒软件和windows防御软件,但这也无济于事。我卸载并重新安装了netbeans 7.4和8.0。
PS:我已经浏览了几个stackoverflow帖子,但找不到任何答案来帮助我。
服务器日志
Jul 22, 2014 1:18:19 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jul 22, 2014 1:18:19 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jul 22, 2014 1:18:19 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@20d04cf3')
Jul 22, 2014 3:12:25 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jul 22, 2014 3:12:25 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jul 22, 2014 3:12:25 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@136da584')
Jul 22, 2014 3:37:06 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jul 22, 2014 3:37:06 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jul 22, 2014 3:37:06 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@ad0db19')
禁用ipv6解决了我的问题。如果你使用windows 8,你必须在注册表中这样做。Windows 7及以下版本,在Microsoft fix it站点有一个安装程序
在NetBeans on Tools> Servers中,在Platform选项卡中禁用Use IDE Proxy Settings
这几天我一直在为这件事绞尽脑汁。起初,它只是挂起,等待部署tomcat…直到永远。在所有故障排除之后,硬重置是解决问题的唯一方法,但它只解决了应用程序的一次运行。
当前的问题是用户和密码提示不会弹出在我的屏幕上…
我能找到的唯一解决办法是在netbeans/preferences中关闭代理,选择"no proxy"…就像这样,web应用程序在几秒钟内部署完毕。