今天配置Spring来显示flex的项目。
出现了这个错误。
Context [/XXX(我的项目)] startup failed due to previous errors
web.xml中:
<context-param>
<param-name>contextConfigLocation </param-name>
<param-value>/WEB-INF/applicationContext.xml </param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
----------------------
去掉
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
就可以不报这个错误,但是,却不能使用spring链接。
-----------------------------------
原来是因为:
org.springframework.web.context.ContextLoaderListener
是在Servlet2.4容器上才有的.以前版本是没有的.你看看你使用的容器是否是Servlet2.4,不是的话.
以前版本是这样用的.
<servlet>
<servlet-name>SpringContextServlet </servlet-name>
<servlet-class>org.springframework.web.context.ContextLoaderServlet </servlet-class>
<load-on-startup>1 </load-on-startup>
</servlet>
------------------------------
删除<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
用上边的替代,即可。
--------------------------------------
ps:确定
你可能把不要的包也导进去了或是哪个必需的包没导入,以下是必需包:
Spring包(9个):
commons-dbcp.jar、commons-pool.jar、spring.jar、spring-beans.jar、
spring-context.jar、spring-core.jar、spring-dao.jar、
spring-hibernate3.jar、spring-web.jar。
struts2.0包(6个):commons-logging-api-1.1.jar、freemarker-2.3.8.jar
ognl-2.6.11.jar、struts2-core-2.0.8.jar、
struts2-spring-plugin-2.0.11.2.jar、xwork-2.0.3.jar
hibernate包:myeclipse工具自动添加生成导入。
---------------------
ps2:还要确定,导入jar
在Spring MVC开发的时候,如果从Spring 1.2.x 迁移到Spring 2.0版本的时候,可能会碰到类似于
java.lang.NoSuchMethodError: org.springframework.beans.factory.config.ConfigurableListableBeanFactory.registerScope(Ljava/lang/String;Lorg/springframework/beans/factory/config/Scope;)V
的错误,原因就在于这两个版本的API发生了变化。
由于Spring API依赖其他的包,比如Jakarta Commons下面的包,所以在版本升级的时候,要同时升级其他依赖的包,特别是版本从1升级到2的情况下,更要小心。
预祝大家Spring开发顺利!
分享到:
相关推荐
NULL 博文链接:https://123390255-qq-com.iteye.com/blog/1100047
Tomcat的详细错误日志不见了,只报一个万恶的Context [] startup failed due to previous errors,却找不到previous errors具体是啥东西
主要介绍了IDEA遇到Internal error. Please refer to http://jb. gg/ide/critical-startup-errors的问题及解决办法,本文通过图文并茂的形式给大家介绍的非常详细,需要的朋友可以参考下
信息: Deploying web application ...严重: Context [/blog] startup failed due to previous errors ApplicationFilterConfig[name=EncodingFilter, filterClass=com.v512.guestbook.web.CharacterEncodingFilter]
startup_stm32f40_41xxx.s
严重: Context [/OAProject] startup failed due to previous errors 2009-8-29 14:02:25 org.apache.catalina.core.ApplicationContext log 信息: Closing Spring root WebApplicationContext log4j:WARN No ...
启动项目管理器startup启动项目管理器startup
Leveraging visual tools, The Startup Equation leads you step by step through the decisions you need to make to find your perfect startup model. You'll learn things such as identifying your unique ...
# due to encryption on boot chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor chown system system /sys/...
Applies to: Oracle Server - Enterprise Edition - Version: 10.2.0.4 to 11.1.0.6 ...NOTE:419871.1 - Failures due to "skgxpvfymmtu: process failed because of a resource problem in the OS" on 32-bit Linux
文章目录1.视界2.背景2.1 开始2.2 恐慌2.3 转机2.3.1 时间机器2.3.2 重新安装...2.启动,按下启动按钮的时候,按住command+R键盘,然后会出现一个旋转的地球,我的果然出现了,然后网上说会出现一个选择wifi的框框,选
关于对2022.1.1以后VHLS不能生成IP核的解决补丁
- Enhanced the mechanism to report memory hardware errors in the Memory torture test. Release 5.3 build 1033 WIN32 release 1 October 2008 - Changes to correct a BurnInTest crash problem on some ...
apache下比如我的apache装在D盘,目录是D:/severs/apache PHP的目录是D:/servers/php5 这样,把D:/servers/php5/libmysql.dll拷贝到D:/servers/apache/bin这个目录下面 重启apache,问题迎刃而解!~~iis下:将php...
swing 皮肤 substance
今天在家启动PHP环境的时候,突然发现不能加载php_mysqli.dll了,网上找了一圈,没有解决方案!在群里面受一哥们儿的启发,竟然解决了,如果你的问题还没有解决,请按下面的方法试试
This example shows how to configure the MEMS accelerometre to detect acceleration on X/Y axis and to detect the click/double click on Z axis. After startup the program checks the MEMS accelerometre ...