Struts 2.x异常:Unable to load configuration..../WEB-INF/lib/struts2-convention-plugin-2.1.6.jar!/struts-plugin.xml:30:119

在开发Struts 2.x项目时,如果将struts-2.1.6-all.zip中lib文件夹中的jar包一股脑的导入到项目工程中就会出现如下异常,我觉得这是Struts2的一大bug,更确切的说是设计缺陷。

2009-2-18 15:02:09 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info 信息: Parsing configuration file [struts-default.xml] 2009-2-18 15:02:10 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info 信息: Parsing configuration file [struts-plugin.xml] 2009-2-18 15:02:10 org.apache.catalina.core.StandardContext filterStart 严重: Exception starting filter struts2 Unable to load configuration. - bean - jar:file:/C:/Tomcat6/webapps/EJBBookStoreWebModule/WEB-INF/lib/struts2-convention-plugin-2.1.6.jar!/struts-plugin.xml:30:119  at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)  at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)  at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)  at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)  at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)  at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)  at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)  at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)  at org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)  at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)  at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)  at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)  at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1217)  at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)  at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)  at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)  at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)  at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)  at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)  at java.lang.Thread.run(Thread.java:595) Caused by: Unable to load bean: type:com.opensymphony.xwork2.UnknownHandler class:org.apache.struts2.convention.ConventionUnknownHandler - bean - jar:file:/C:/Tomcat6/webapps/EJBBookStoreWebModule/WEB-INF/lib/struts2-convention-plugin-2.1.6.jar!/struts-plugin.xml:30:119  at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:222)  at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)  at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:165)  at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)  ... 22 more Caused by: Bean type interface com.opensymphony.xwork2.UnknownHandler with the name default has already been loaded by bean - jar:file:/C:/Tomcat6/webapps/EJBBookStoreWebModule/WEB-INF/lib/struts2-codebehind-plugin-2.1.6.jar!/struts-plugin.xml:29:122 - bean - jar:file:/C:/Tomcat6/webapps/EJBBookStoreWebModule/WEB-INF/lib/struts2-convention-plugin-2.1.6.jar!/struts-plugin.xml:30:119  at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:206)  ... 25 more 2009-2-18 15:02:10 org.apache.catalina.core.StandardContext start 严重: Error filterStart 2009-2-18 15:02:10 org.apache.catalina.core.StandardContext start 严重: Context [/EJBBookStoreWebModule] startup failed due to previous errors 解决方案 :

将struts-2.1.6-all.zip中apps文件夹中struts2-blank-2.1.6.war文件解压。进入struts2-blank-2.1.6/WEB-INF/lib,只将该文件夹下的9个jar包导入到项目工程中即可,其余的包如果没有用到切不可轻易导入。

Struts 2.x异常:Unable to load configuration..../WEB-INF/lib/struts2-convention-plugin-2.1.6.jar!/struts-plugin.xml:30:119的更多相关文章

  1. 报错:Unable to load configuration. - action - file:/E:/apache-tomcat-8.0.37/webapps/20161102-struts2-3/WEB-INF/classes/struts.xml:11:73

    第一种报错: 严重: Exception starting filter struts2Unable to load configuration. - action - file:/E:/apache ...

  2. Caused by: Unable to load configuration. - action - file:/C:/apache-tomcat-7.0.70/webapps/Structs/WEB-INF/classes/struts.xml:7:72 at com.opensymphony.xwork2.config.ConfigurationManager.getConfigurati

    Unable to load configuration. - action - file:/C:/apache-tomcat-7.0.70/webapps/Structs/WEB-INF/class ...

  3. 启动tomcat后struts框架报异常严重: Exception starting filter struts2 Unable to load configuration.

    启动tomcat后struts框架报异常严重: Exception starting filter struts2 Unable to load configuration. 出现此异常是因为,str ...

  4. 启动tomcat后struts框架报异常严重: Exception starting filter struts2 Unable to load configuration. - Class: java.net.PlainSocketImpl

    今天刚好宿舍断网,打开电脑,打开ide工具,启动tomcat后,访问web项目工程,页面显示404,查看控制台,运行报错信息如下: 严重: Exception starting filter stru ...

  5. tomcat启动异常(严重: Dispatcher initialization failed Unable to load configuration. - [unknown location] )

    严重: Dispatcher initialization failed Unable to load configuration. - [unknown location] at com.opens ...

  6. 出现错误:Unable to load configuration. - action - file:/E:/Java/Tomcat7.0/apache-tomcat-7.0.68-windows-x64/apache-tomcat-7.0.68/webapps/SSH2Integrate/WEB-INF/classes/struts.xml:8:43

    严重: Exception starting filter struts2 Unable to load configuration. - action - file:/E:/Java/Tomcat7 ...

  7. Struts 2.x Unable to load configuration. - action

    问题分析:遇到该问题一般是struts中某个配置文件没有正确配置,比如: 1.class中的TestAction没有成功加载: <constant name="struts.i18n. ...

  8. Unable to load configuration. - action - file:/F:/apache-tomcat-8.0.30/webapps/test1Struts2/WEB-INF/classes/struts.xml:11:71

    Unable to load configuration. - action - file:/F:/apache-tomcat-8.0.30/webapps/test1Struts2/WEB-INF/ ...

  9. Unable to load configuration. - action - file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%209.0/webapps/Teacher04/WEB-INF/classes/struts.xml:9:54

    发布一个struts2项目的时候tomcat显示下面这个错误,我的本能感觉就是我的struts.xml或者web.xml写错了,可是我字母找都没发现,于是百度一番,可是我对那些人的回答表示怀疑,感觉应 ...

随机推荐

  1. Sourcetree add Submodule

    LMXMN041:ximalaya will.wei$ git submodule add https://github.com/willbin/WeLib02.git Submodule Cloni ...

  2. CKEditor如何统计文字数量

    今天在修改v5后台的比赛系统时,发现文本框需要限制输入字数.我们这个系统用的是3.6.3版本的,前台代码是这样的 <script> //编辑器 CKEDITOR.replace('matc ...

  3. hdu1722 bjfu1258 辗转相除法

    这题就是个公式,代码极简单.但我想,真正明白这题原理的人并不多.很多人只是随便网上一搜,找到公式a了就行,其实这样对自己几乎没有提高. 鉴于网上关于这题的解题报告中几乎没有讲解原理的,我就多说几句,也 ...

  4. ASP.NET常用加密解密方法

    ASP.NET常用加密解密方法 一.MD5加密解密 1.加密 C# 代码           public static string ToMd5(string clearString)        ...

  5. void、void*以及NULL

    void.void*以及NULL 写在前面 在使用C++的过程中,void和NULL用到的频率挺高的,但是从来没有去探索过这两个关键字的联系和区别,也没有对它们做更多的探索.对于void*,说实话,实 ...

  6. FS,FT,DFS,DTFT,DFT,FFT的联系和区别

    DCT变换的原理及算法 文库介绍 对于初学数字信号处理(DSP)的人来说,这几种变换是最为头疼的,它们是数字信号处理的理论基础,贯穿整个信号的处理. 学习过<高等数学>和<信号与系统 ...

  7. 在windows7下配置PHP访问ICE中间件(ICE3.5.1+PHP5.4+Apache2.2 for vc9)

    按照ICE的官方文档(http://doc.zeroc.com/display/Ice/Using+the+Windows+Binary+Distribution#UsingtheWindowsBin ...

  8. OpenStack的Resize和冷迁移代码解析及改进

    原文:http://www.hengtianyun.com/download-show-id-79.html OpenStack的Resize(升级)功能,我们可以改变虚拟机的CPU核数.内存及磁盘大 ...

  9. Linux Oracle服务启动&停止脚本与开机自启动

    在CentOS 6.3下安装完Oracle 10g R2,重开机之后,你会发现Oracle没有自行启动,这是正常的,因为在Linux下安装Oracle的确不会自行启动,必须要自行设定相关参数,首先先介 ...

  10. VS2012编译可在WinXP兼容程序

    VS2012需要安装Update 1补丁 在Project的属性 选择 配置属性 - 常规 - 平台工具集 - Visual Studio 2012 - Windows XP (v110_xp) 在P ...