Tomcat7+Spring3异常Failed to start component

我做的一个考试系统,使用了hibernatespring,原来使用的tomcat版本是6,后来把tomcat换成了apache-tomcat-7.0.30-windows-x64,spring的版本是:3.1

结果启动tomcat时报错如下:

.6.

Feb 27, 2013 12:18:00 AM org.apache.catalina.core.AprLifecycleListener init

INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], ra

ndom [true].

Feb 27, 2013 12:18:01 AM org.apache.catalina.core.AprLifecycleListener initializ

eSSL

INFO: OpenSSL successfully initialized (OpenSSL 1.0.1c 10 May 2012)

Feb 27, 2013 12:18:01 AM org.apache.coyote.AbstractProtocol init

INFO: Initializing ProtocolHandler ["http-apr-8084"]

Feb 27, 2013 12:18:01 AM org.apache.coyote.AbstractProtocol init

INFO: Initializing ProtocolHandler ["ajp-apr-8009"]

Feb 27, 2013 12:18:01 AM org.apache.catalina.startup.Catalina load

INFO: Initialization processed in 1026 ms

Feb 27, 2013 12:18:01 AM org.apache.catalina.core.StandardService startInternal

INFO: Starting service Catalina

Feb 27, 2013 12:18:01 AM org.apache.catalina.core.StandardEngine startInternal

INFO: Starting Servlet Engine: Apache Tomcat/7.0.30

Feb 27, 2013 12:18:01 AM org.apache.catalina.startup.HostConfig deployDirectory

INFO: Deploying web application directory C:\kunlunsoft\exam2\tomcat\webapps\doc

s

Feb 27, 2013 12:18:01 AM org.apache.catalina.startup.HostConfig deployDirectory

INFO: Deploying web application directory C:\kunlunsoft\exam2\tomcat\webapps\exa

m004

Feb 27, 2013 12:18:01 AM org.apache.catalina.loader.WebappClassLoader validateJa

rFile

INFO: validateJarFile(C:\kunlunsoft\exam2\tomcat\webapps\exam004\WEB-INF\lib\ser

vlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending c

lass: javax/servlet/Servlet.class

Feb 27, 2013 12:18:08 AM org.apache.catalina.core.ContainerBase addChildInternal

 

SEVERE: ContainerBase.addChild: start:

org.apache.catalina.LifecycleException: Failed to start component [StandardEngin

e[Catalina].StandardHost[localhost].StandardContext[/exam004]]

        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.Java:154)

        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase

.java:901)

        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:87

7)

        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)

 

        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav

a:1100)

        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig

.java:1618)

        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

        at java.util.concurrent.FutureTask.run(Unknown Source)

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source

)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

        at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.NullPointerException

        at org.springframework.web.SpringServletContainerInitializer.onStartup(S

pringServletContainerInitializer.java:142)

        at org.apache.catalina.core.StandardContext.startInternal(StandardContex

t.java:5274)

        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

        ... 11 more

Feb 27, 2013 12:18:08 AM org.apache.catalina.startup.HostConfig deployDirectory

SEVERE: Error deploying web application directory C:\kunlunsoft\exam2\tomcat\web

apps\exam004

java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catal

ina.LifecycleException: Failed to start component [StandardEngine[Catalina].Stan

dardHost[localhost].StandardContext[/exam004]]

        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase

.java:904)

        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:87

7)

        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)

 

        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav

a:1100)

        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig

.java:1618)

        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

        at java.util.concurrent.FutureTask.run(Unknown Source)

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source

)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

        at java.lang.Thread.run(Unknown Source)

Feb 27, 2013 12:18:08 AM org.apache.catalina.startup.HostConfig deployDirectory

INFO: Deploying web application directory C:\kunlunsoft\exam2\tomcat\webapps\hos

t-manager

Feb 27, 2013 12:18:08 AM org.apache.catalina.startup.HostConfig deployDirectory

INFO: Deploying web application directory C:\kunlunsoft\exam2\tomcat\webapps\man

ager

Feb 27, 2013 12:18:08 AM org.apache.catalina.startup.HostConfig deployDirectory

INFO: Deploying web application directory C:\kunlunsoft\exam2\tomcat\webapps\ROO

T

Feb 27, 2013 12:18:08 AM org.apache.coyote.AbstractProtocol start

INFO: Starting ProtocolHandler ["http-apr-8084"]

Feb 27, 2013 12:18:08 AM org.apache.coyote.AbstractProtocol start

INFO: Starting ProtocolHandler ["ajp-apr-8009"]

Feb 27, 2013 12:18:08 AM org.apache.catalina.startup.Catalina start

INFO: Server startup in 7167 ms

 

解决办法

后来 在网上查了好长时间,看到了如下文章:

http://hi.baidu.com/renyijiu/item/9dfda05328afe7464eff20b7

把 spring 的版本更新为3.2.1.RELEASE ,问题就解决了。

时间: 2024-11-02 07:34:39

Tomcat7+Spring3异常Failed to start component的相关文章

SSH异常“Failed to start OpenSSH Server daemon”问题排查

SSH无法正常启动,运行service sshd status 结果如下,没有明显的异常 sshd -t 测试一下错误就很明显了 vi /etc/ssh/sshd_config 将对应的行先注释掉重启失败,查看详细信息 systemctl status sshd.service /usr/sbin/sshd -t 测试(其实错误信息已经很明显了,再看详细点的) 根据提示,把涉及的key文件全部改成600后 /usr/sbin/sshd -t 测试没有报错了,启动服务,正常登陆( sshd –t

Tomcat7启动报NoClassDefFoundError,Jetty启动正常

问题描述 今天使用Maven做了个Struts2+Spring3+Hibernate4的小Demo,使用Tomcat7启动时报错,错误信息如下: 2013-12-2 13:53:49 org.apache.catalina.core.AprLifecycleListener init信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments w

启动tomcat7遇到错误!

问题描述 启动tomcat7遇到错误! 2013-7-1 10:34:46 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:Program File

web-tomcat8异常 不知道该怎么破

问题描述 tomcat8异常 不知道该怎么破 以前没出现过,百度了,依旧没解决.请问这是怎么回事,该怎么解决?谢谢!(tomcat8)?java.util.concurrent.ExecutionException:?org.apache.catalina.LifecycleException:?Failed?to?start?component?[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/web]]???

spring mvc-我用springMVC写了一个web项目,加载到tomcat8上后启动出现此异常,请懂得的来帮忙看下

问题描述 我用springMVC写了一个web项目,加载到tomcat8上后启动出现此异常,请懂得的来帮忙看下 异常信息如下: 严重: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/spring_mvc]] at or

myeclipse-Myeclipse 2015在部署项目时出现异常

问题描述 Myeclipse 2015在部署项目时出现异常 org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/SurperMarket]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)

tomcat7 启动报错(转)

  不加载任何自己的项目启动即报错:   严重: Error deploying web application directory D:\tomcat7.0.30\webapps\docs java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catal ina.LifecycleException: Failed to start component [StandardEngine[Catalin

异常-Myeclipse 2014部署SSH项目,Tomcat出现问题

问题描述 Myeclipse 2014部署SSH项目,Tomcat出现问题 org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/assistant]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:

spring-dao层对象使用@Repository无法实例化,但是使用@Component就可以

问题描述 dao层对象使用@Repository无法实例化,但是使用@Component就可以 //@Repository("authOrganizationDao") @Component public class AuthOrganizationDao { /** * @Fields serialVersionUID: */ private static final long serialVersionUID = 776406843975885312L; /** * 获取实体类的C