文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

Tomcat7+Spring3异常Fai

2023-01-31 03:31

关注
我做的一个考试系统,使用了hibernate和spring,原来使用的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 ,问题就解决了。
阅读原文内容投诉

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     813人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     354人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     318人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     435人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     224人已做
    查看

相关文章

发现更多好内容

猜你喜欢

AI推送时光机
位置:首页-资讯-后端开发
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯