SSH框架搭建遇到的问题----Unable to load configuration. - bean - jar:file:/D:/Tomcat%206.0/webapps/bar/WEB-INF
2014-06-28 17:53
656 查看
我从官方下的struts-2.1.6-all.zip 然后把里面的LIB的包全都导入了 但是出如下错误
Unable
to load configuration. - bean - jar:file:/F:/Web/homesite/jsp/struts/WEB-INF/lib/struts2-convention-plugin-2.1.6.jar!/struts-plugin.xml:30:119
其实是包加载多了,相互冲突的原因。我们要做的是,只加载需要的几个包。
解决方案:
将struts-2.1.6-all.zip中apps文件夹中struts2- blank-2.1.6.war文件解压。进入struts2-blank-2.1.6\WEB-INF\lib,只将该文件夹下的9个jar包导入到项 目工程中即可,其余的包如果没有用到切不可轻易导入。
这是apache的失误。按照官方文档说明,运行Struts2必须加载5个核心jar包,也就是咱们一开始拷贝的5个jar包,如果你用的是
Struts2之前的版本是没有问题的,但是如果去下载这个新版本,就会报如上错误,因为还需要加载另外两个jar包,可是官方的说明文档没有更新。
解决方案:在Struts2的解压缩文件夹内的lib文件夹里, 我们找到下列2个jar : commons-fileupload-1.2.1.jar、commons-io-1.3.2.jar,把他们复制到项目根目录下的"WEB-INF"lib"文件夹内。
既然少了jar,图省事把包struts lib下的jar全都复制到工程目录中。这样做又会出现类似上面的错误提示。所以如非必要,不要加载其它的jar,这大概是struts2.1.6的bug。一般只需加载以下7个jar(其他用到的包再慢慢添加):
struts2-core-2.1.6.jar、
xwork-2.1.2.jar、
freemarker-2.3.13.jar、
ognl-2.6.11.jar、
commons-logging-1.0.4.jar、
commons-fileupload-1.2.1.jar、
commons-io-1.3.2.jar
Unable
to load configuration. - bean - jar:file:/F:/Web/homesite/jsp/struts/WEB-INF/lib/struts2-convention-plugin-2.1.6.jar!/struts-plugin.xml:30:119
其实是包加载多了,相互冲突的原因。我们要做的是,只加载需要的几个包。
解决方案:
将struts-2.1.6-all.zip中apps文件夹中struts2- blank-2.1.6.war文件解压。进入struts2-blank-2.1.6\WEB-INF\lib,只将该文件夹下的9个jar包导入到项 目工程中即可,其余的包如果没有用到切不可轻易导入。
这是apache的失误。按照官方文档说明,运行Struts2必须加载5个核心jar包,也就是咱们一开始拷贝的5个jar包,如果你用的是
Struts2之前的版本是没有问题的,但是如果去下载这个新版本,就会报如上错误,因为还需要加载另外两个jar包,可是官方的说明文档没有更新。
解决方案:在Struts2的解压缩文件夹内的lib文件夹里, 我们找到下列2个jar : commons-fileupload-1.2.1.jar、commons-io-1.3.2.jar,把他们复制到项目根目录下的"WEB-INF"lib"文件夹内。
既然少了jar,图省事把包struts lib下的jar全都复制到工程目录中。这样做又会出现类似上面的错误提示。所以如非必要,不要加载其它的jar,这大概是struts2.1.6的bug。一般只需加载以下7个jar(其他用到的包再慢慢添加):
struts2-core-2.1.6.jar、
xwork-2.1.2.jar、
freemarker-2.3.13.jar、
ognl-2.6.11.jar、
commons-logging-1.0.4.jar、
commons-fileupload-1.2.1.jar、
commons-io-1.3.2.jar
相关文章推荐
- SSH框架搭建遇到的问题----Unable to load configuration. - bean - jar:file:/D:/Tomcat%206.0/webapps/bar/WEB-INF
- Unable to load configuration. - bean - jar:file:/E:/tomcat-7.0.11/webapps/struts/WEB-INF/lib/struts
- 问题解决:Unable to load configuration. - bean - jar:file:/D:/Tomcat-6.0.13/webapps/teabank/WEB-INF/lib/struts2-core-2.1.8.1.jar!/str
- Unable to load configuration. - bean - jar:file:/D:/javaProgramFiles/tomcat-6.0.20/webapps/zoyeo
- Unable to load configuration. - action - file:/D:/apache-tomcat-7.0.68/webapps/SSHDemo/WEB-INF/class
- Unable to load configuration. - action - file:/C:/apache-tomcat-7.0.75/webapps/ROOT/WEB-INF/classes/
- Struts2.2.1启动异常之 Unable to load configuration. - bean - jar:file:/E:/Program%20Files/tomcat6/webapps/Struts2ZeroC/WEB-INF/lib/st
- tomcat下配置struts2的Unable to load configuration.-bean-jar:file问题
- Unable to load configuration. - bean - jar:file:/D:/Tomcat6.0/webapps/Struts2/WEB-INF/lib/struts2-co
- Unable to load configuration. - action - file:/D:/apache-tomcat-6.0.39/webapps/SSH/WEB- INF/classes
- Unable to load configuration. - bean - jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/golfclub
- Unable to load configuration. - action - file:/F:/apache-tomcat-7.0.27/webapps/CRM/WEB-INF/classes/s
- Unable to load configuration. - bean - jar:file:/D:/apache-tomcat-8.0.30/web
- struts2出现Unable to load configuration. - bean - jar:file:/...struts-default.xml问题
- 出现错误: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
- Unable to load configuration. - action - file:/D:/Program Files/apache-tomcat-6.0.26/webapps/LearnSt
- eclipse 中 Unable to load configuration. - action - file:/C:/Program%20Files/apache-tomcat-7.0.5/webapps/ch02/WEB-INF/classes/struts.xml:7:76
- SSH整合问题:Unable to load configuration. - bean - jar:file:/
- Struts2 Unable to load configuration. - bean - jar:file:…………WEB-INF/lib/struts2-core-2.1.8.jar!
- Unable to load configuration. - bean - jar:file:/d:/Tomcat/webapps/ssh007/WEB-INF/lib/struts2-spring-plugin-2.1.8.1.jar!/struts-