繁体   English   中英

Tomcat 7服务器将无法在eclipse中启动,并显示错误消息“在本地主机(2)上启动Tomcat v7.0服务器遇到问题”。

[英]Tomcat 7 server won't start within eclipse with error `Starting Tomcat v7.0 Server at localhost (2) has encountered a p‌r‌o‌b‌l‌e‌m`

执行我的简单hello world程序时,出现Tomcat Server错误

“在本地主机(2)上启动Tomcat Server v7.0遇到问题”

我正在使用jdk7 nd spring 3.1.0,但尚未引入hibernate或maven。 谁能帮我解决错误。 控制台输出如下:

Aug 21, 2014 10:15:31 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files (x86)/Java/jre8/bin/client;C:/Program Files (x86)/Java/jre8/bin;C:/Program Files (x86)/Java/jre8/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\VisualSVN\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Java\jre8\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\VisualSVN\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\MySQL\MySQL Server 5.0\bin\;C:\Program Files (x86)\Java\jre8;C:\Program Files (x86)\Java\jre8\lib;D:\Program Files\apache-ant-1.9.4\bin;C:\Program Files (x86)\Java\jre8\bin;D:\Softwares\Eclipse Dump\EclipseForSpring;;.
Aug 21, 2014 10:15:31 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:HelloWorld' did not find a matching property.
Aug 21, 2014 10:15:31 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Aug 21, 2014 10:15:31 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Aug 21, 2014 10:15:31 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1082 ms
Aug 21, 2014 10:15:31 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Aug 21, 2014 10:15:31 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.55
Aug 21, 2014 10:15:32 AM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [203] milliseconds.
Aug 21, 2014 10:15:34 AM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Aug 21, 2014 10:15:34 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'HelloWorld'
Aug 21, 2014 10:15:34 AM org.springframework.web.servlet.FrameworkServlet initServletBean
INFO: FrameworkServlet 'HelloWorld': initialization started
Aug 21, 2014 10:15:34 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing WebApplicationContext for namespace 'HelloWorld-servlet': startup date [Thu Aug 21 10:15:34 IST 2014]; root of context hierarchy
Aug 21, 2014 10:15:34 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/HelloWorld-servlet.xml]
Aug 21, 2014 10:15:35 AM org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters
INFO: JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
Aug 21, 2014 10:15:35 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@4258426: defining beans [helloWorldController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.web.servlet.view.InternalResourceViewResolver#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
Aug 21, 2014 10:15:35 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/hello] onto handler 'helloWorldController'
Aug 21, 2014 10:15:35 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/hello.*] onto handler 'helloWorldController'
Aug 21, 2014 10:15:35 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/hello/] onto handler 'helloWorldController'
Aug 21, 2014 10:15:35 AM org.springframework.web.servlet.FrameworkServlet initServletBean
INFO: FrameworkServlet 'HelloWorld': initialization completed in 936 ms
Aug 21, 2014 10:15:35 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Aug 21, 2014 10:15:35 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Aug 21, 2014 10:15:35 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4138 ms

看来这个问题与spring,hibernate或maven无关。 就像它说的那样,它期望找不到它的native library 您可以在Tomcat Native中找到该本地库并将其存储在tomcat期望的位置

主题讨论与您相同的问题。

当您使用Windows时,我建议您使用tomcat installer以避免不必要的问题。

您收到的消息是正常的。 您可以忽略它,因为我认为它不会产生任何问题,但是您仍然想要解决此问题,您需要编译Tomcat Native附带的源包,而我还没有尝试过。 据说在tomcat网站上Use MS Visual Studio to open the workspace of the APR sources and build the library (libapr). 并给出进一步说明。

您可以更改Eclipse Tomcat服务器配置。 打开服务器视图,双击服务器以打开服务器配置。 然后单击以激活“将模块内容发布到单独的XML文件”。 最后,重新启动服务器,该消息必须消失。

此时间页面将没有任何问题。 在此处输入图片说明

暂无
暂无

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

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