Tomcat 7无法在Eclipse 4.2中启动(超时)。如何获得更详细的输出?

时间:2013-05-03 11:22:05

标签: java eclipse spring spring-mvc tomcat7

我真的在为Tomcat给我超时的Eclipse项目苦苦挣扎。我一开始认为这可能是我在某些项目配置中犯的错误,所以我恢复了我的代码的早期版本。然而,这仍然是同样的错误!当我尝试沿着现有项目启动一个新项目(Spring MVC)时,新项目似乎工作正常(如果我禁用非工作项)服务器现在启动。

我的问题是:如何从Tomcat获得更详细的输出或日​​志?服务器告诉我“它无法在时间限制内启动”并没有真正帮助我。我发现这种问题的大多数解决方案都不是真正的解决方案,但是“删除服务器并再次添加”或“删除你的eclipse工作区并重新开始”,等等。真的不可能得到Tomcat 7做一些正确的调试记录,告诉我发生了什么?

以下是我得到的所有输出:

mai 03, 2013 1:17:45 PM org.apache.catalina.core.AprLifecycleListener init
mai 03, 2013 1:17:46 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:kneip' did not find a matching property.
mai 03, 2013 1:17:46 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
mai 03, 2013 1:17:46 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
mai 03, 2013 1:17:46 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 666 ms
mai 03, 2013 1:17:46 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
mai 03, 2013 1:17:46 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.12
mai 03, 2013 1:17:57 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
INFO : org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started
INFO : org.springframework.web.context.support.AnnotationConfigWebApplicationContext - Refreshing Root WebApplicationContext: startup date [Fri May 03 13:17:57 CEST 2013]; root of context hierarchy
INFO : org.springframework.context.annotation.ClassPathBeanDefinitionScanner - JSR-330 'javax.inject.Named' annotation found and supported for component scanning
INFO : org.springframework.web.context.support.AnnotationConfigWebApplicationContext - Successfully resolved class for [net.krg.kneip.AppConfig]
INFO : org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
INFO : org.springframework.beans.factory.support.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@4cb8a2a9: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,appConfig,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor,camel,jmsConfig,activeMq,pooledConnectionFactory,jmsConnectionFactory,applicationContextProvider]; root of factory hierarchy

提前致谢!

1 个答案:

答案 0 :(得分:0)

最后,你需要增加从eclipse启动tomcat的超时限制。

  • 双击“Servers”视图中的Server(“Apache Tomcat”)。
  • 打开“超时”部分
  • 将“开始(以秒为单位)”增加到120

这不会导致更多日志信息,但它应该可以解决您的问题。

increase timeout limt