myeclipse中用S1.2S2.0H3.0的包异常

记录一下在myeclipse中用Struts1.2+spring2.0+hibernate3.0搭框架的时候遇到的问题:
一。Spring2.0里面已经有hibernate3.0包
需要导入的包有:
Spring 2.0
Core ,AOP,Persistence JDBC,Persistence,Core ,Remoting ,Web Libraries
Hibernate 3.0
Hibernate 3.0 Core ,Advancesd Support
Referenced

二。异常

1.包的冲突
异常(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V

1.去掉类路径上的关于Hibernate的3个lib
asm.jar
asm-attrs.jar
cglib-2.1.3.jar

2.加入Spring中的以下4个lib
asm-2.2.2.jar
asm-commons-2.2.2.jar
asm-util-2.2.2.jar
cglib-nodep-2.1_3.jar

2.异常:找不到Action--selevlet.xml

需要加入  <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property
property="contextConfigLocation"
value="/WEB-INF/classes/applicationContext.xml"/>
</plug-in>

        路径名称检查是否写对

3.java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool

下载commons-pool.jar包导入

在MyEclipse6.5中搭建Struts2+Spring2.5+hibernate3.2 也遇到包冲突  需要删除hibernate中asm.jar,asm-attrs.jar,cglib-2.1.jar

你可能感兴趣的:(apache,spring,AOP,Hibernate,MyEclipse)