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. 省常中模拟 Test3 Day2

    matrix 找规律 题意:给定一个 N*N 的只有 0 和 1 的矩阵,有 Q 个操作,分三种:1. 将某行上的所有数字取反:2. 将某列上的所有数字取反:3. 输出 sum{ a[i][j]*a[ ...

  2. WebService 出现因 URL 意外地以“/HelloWorld”结束,请求格式无法识别。

    要在webservice的web.config文件中的 <system.web> 节点下加入: <webServices>    <protocols>       ...

  3. 查看tablespace实际使用量和剩余空间

    到某表空间所有段的加和值,即按表空间分组统计dba_data_files.bytes-dba_free_space.bytes=dba_segments.bytesdba_segments中可查询已分 ...

  4. delphi 转换sql server 中的 bit类型

    FieldByName('e').AsBoolean = false 其中e为 sql server 中的bit类型.

  5. hdu 2155 小黑的镇魂曲(dp) 2008信息工程学院集训队——选拔赛

    感觉蛮坑的一道题. 题意很像一个叫“是男人下100层”的游戏.不过多了个时间限制,要求在限定时间内从某一点下落到地面.还多了个最大下落高度,一次最多下落这么高,要不然会摔死. 一开始想dp的,然后想了 ...

  6. Hadoop中的InputFormat解析

    1.InputFormat InputFormat是Hadoop平台上Mapreduce输入的规范,仅有两个抽象方法. List<InputSplit> getSplits(), 获取由输 ...

  7. Dubbo入门实例--转载

    原文地址:http://blog.csdn.net/ruishenh/article/details/23180707?utm_source=tuicool 1.   概述 Dubbo是一个分布式服务 ...

  8. CXF之一 基础理论介绍

    WebService介绍   WebService让一个程序可以透明地调用互联网程序,不用管具体的实现细节.只要WebService公开了服务接口,远程客户端就可以调用服务.WebService是基于 ...

  9. IOS UINavigationController 操作相关集合

    1.修改中间Title字体以及大小 [self.navigationController.navigationBar setTitleTextAttributes:[NSDictionary dict ...

  10. 提取数字、英文、中文、过滤重复字符等SQL函数(含判断字段是否有中文)

    --SQL 判断字段值是否有中文 create  function  fun_getCN(@str  nvarchar(4000))    returns  nvarchar(4000)      a ...