struts2.1.8+spring2.5.6+hibernate3.2框架搭建错误

1.java.lang.RuntimeException: java.lang.RuntimeException: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=java.lang.String, name='actionPackages'] in public void org.apache.struts2.config.ClasspathPackageProvider.setActionPackages(java.lang.String).
at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:132)
    at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)
。。。。。。。

出现此错误的原因:你添加了struts2-codebehind-plugin包,去掉就OK了

2.严重: Actual exception
Could not load class org.apache.struts2.jsf.FacesSetupInterceptor. Perhaps it exists but certain dependencies are not available? - interceptor - jar:file:/D:/ghl/apache-tomcat-6.0.20/wtpwebapps/SS/WEB-INF/lib/struts2-jsf-plugin-2.1.8.1.jar!/struts-plugin.xml:35:97
at com.opensymphony.xwork2.ObjectFactory.buildInterceptor(ObjectFactory.java:202)

解决:
删除:struts2-jsf-plugin-2.1.8.1.jar
3.严重: Actual exception
Could not load class org.apache.struts2.portlet.interceptor.PortletAwareInterceptor. Perhaps it exists but certain dependencies are not available? - interceptor - jar:file:/D:/ghl/apache-tomcat-6.0.20/wtpwebapps/SS/WEB-INF/lib/struts2-portlet-plugin-2.1.8.1.jar!/struts-plugin.xml:48:114
at com.opensymphony.xwork2.ObjectFactory.buildInterceptor(ObjectFactory.java:202)

解决
删除:struts2-portlet-plugin-2.1.8.1.jar

4.asm包的冲突,去掉asm2.2.3(如果去掉asm的话,还会显示出错)。

5.osgi包,这一点我不太懂,搭建框架时,他们会一直报错,后来将其全部删除(3个),ok。
4.在使用form表单时,如果用action=*.action;会报404,去掉".action",ok!这一点恰好与2.0相反。
6.一个常见的hibernate错误:
org.springframework.orm.hibernate3.HibernateSystemException: a different object with the same identifier value was already associated with the session

出错原因:我在关联的双方都设置了cascade,所以出现了这个错误,汗。。。。
去掉<many-to-one>属性中的cascade属性,ok!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值