早教吧作业答案频道 -->其他-->
Unabletoloadconfiguration.-action-|Causedby:Actionclass[login]notfound-action-s2sh整合的时候出现如下错误:严重:Exceptionstartingfilterstruts2Unabletoloadconfiguration.-action-file:/D:/workspace/Ecplipse/.metadata/
题目详情
Unable to load configuration.- action - |Caused by:Action class [login] not found - action -
s2sh整合的时候出现如下错误:
严重:Exception starting filter struts2
Unable to load configuration.- action - file:/D:/workspace/Ecplipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/OA/WEB-INF/classes/struts.xml:7:38
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)
.
Caused by:Action class [login] not found - action - file:/D:/workspace/Ecplipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/OA/WEB-INF/classes/struts.xml:7:38
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:405)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:355)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:460)
.
s2sh整合的时候出现如下错误:
严重:Exception starting filter struts2
Unable to load configuration.- action - file:/D:/workspace/Ecplipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/OA/WEB-INF/classes/struts.xml:7:38
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)
.
Caused by:Action class [login] not found - action - file:/D:/workspace/Ecplipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/OA/WEB-INF/classes/struts.xml:7:38
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:405)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:355)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:460)
.
▼优质解答
答案和解析
如果你的struts.xml和applicationContext.xml都配置正确,还报以上的错误,那么可以判断你的项目缺少jar包:
struts2-spring-plugin-2.0.11.1.jar、commons-fileupload-1.2.1.jar和commons-io-1.3.2.jar
导入这些jar包就行了,这些jar可以在struts-2.2.1的lib下找到.
在搭工程的时候,commons-fileupload-1.2.1.jar和commons-io-1.3.2.jar要是忘记了,报错很容易就看出来少哪些jar包,
但是struts2-spring-plugin-2.0.11.1.jar不太容易发现.
struts2-spring-plugin-2.0.11.1.jar、commons-fileupload-1.2.1.jar和commons-io-1.3.2.jar
导入这些jar包就行了,这些jar可以在struts-2.2.1的lib下找到.
在搭工程的时候,commons-fileupload-1.2.1.jar和commons-io-1.3.2.jar要是忘记了,报错很容易就看出来少哪些jar包,
但是struts2-spring-plugin-2.0.11.1.jar不太容易发现.
看了 Unabletoloadco...的网友还看了以下: