struts2和hibernate整合运行tomcat时出现的错误,意思好像是少fileupload.jar包,可是我导入了啊! 10
Unabletoloadconfiguration.-bean-jar:file:/D:/tomcat/apache-tomcat-6.0.20/webapps/sh.m...
Unable to load configuration. - bean - jar:file:/D:/tomcat/apache-tomcat-6.0.20/webapps/sh.myeclipse.bak/WEB-INF/lib/struts2-core-2.1.8.jar!/struts-default.xml:47:178
Caused by: Unable to load configuration. - bean - jar:file:/D:/tomcat/apache-tomcat-6.0.20/webapps/sh.myeclipse.bak/WEB-INF/lib/struts2-core-2.1.8.jar!/struts-default.xml:47:178
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418)
... 28 more
Caused by: Unable to load bean: type:org.apache.struts2.dispatcher.multipart.MultiPartRequest class:org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest - bean - jar:file:/D:/tomcat/apache-tomcat-6.0.20/webapps/sh.myeclipse.bak/WEB-INF/lib/struts2-core-2.1.8.jar!/struts-default.xml:47:178
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:221)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:169)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
... 30 more
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/fileupload/RequestContext
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getDeclaredConstructors(Class.java:1836)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:211)
... 33 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.fileupload.RequestContext
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 37 more 展开
Caused by: Unable to load configuration. - bean - jar:file:/D:/tomcat/apache-tomcat-6.0.20/webapps/sh.myeclipse.bak/WEB-INF/lib/struts2-core-2.1.8.jar!/struts-default.xml:47:178
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418)
... 28 more
Caused by: Unable to load bean: type:org.apache.struts2.dispatcher.multipart.MultiPartRequest class:org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest - bean - jar:file:/D:/tomcat/apache-tomcat-6.0.20/webapps/sh.myeclipse.bak/WEB-INF/lib/struts2-core-2.1.8.jar!/struts-default.xml:47:178
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:221)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:169)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
... 30 more
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/fileupload/RequestContext
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getDeclaredConstructors(Class.java:1836)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:211)
... 33 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.fileupload.RequestContext
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 37 more 展开
4个回答
展开全部
在三大框架整合的时候包得版本不一致会出现很多问题,因为不同的版本底层封装的东西有差异,所以我建议你导包的时候最好把包的版本保持一致。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
去部署的目录看看有没有拷贝过去
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
有可能是jar包版本问题 可以考虑换一个jar包试试
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
可以把struts.xml 位置改一下,放到action类的下方试一下
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询