Unable to instantiate Action, OrderAction, defined for 'OrderActionfindByMethod

Unable to instantiate Action, OrderAction,  defined for 'OrderActionfindByMethod' in namespace ''Error creating bean with name 'OrderAction' defined in class path resource [beans.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError - action - file:/D:/aaa/shop/WebRoot/WEB-INF/classes/struts.xml:173:62

       com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:294)

applicationContext.xml

<bean id="MyInterceptor" class="Unit.Test.MyInterceptor"/>

 

<bean name="Myaction" class="Unit.Test.Myaction" scope="prototype">    

 

</bean>

 

struts.xml

<action name="Myaction*" class="Myaction"  method="{1}">

 

    <result name="updateSuc">/test.jsp</result>  

 

</action>

拦截器代码

@Pointcut("execution (* Unit.Test.Myaction.*del*(..))")定要指定是某个del方法,否则它会那个方法都会拦截的

解决办法是:
1.
去掉类路径上的关于Hibernate3lib(去掉的含义是从整个项目中删除,到回收站里面)不要放在lib的目录的下面。
asm.jar
asm-attrs.jar
cglib-2.1.3.jar

2.流下Spring中的以下4lib(就是保留SpringAOP所需要的jar包)
asm-2.2.2.jar
asm-commons-2.2.2.jar
asm-util-2.2.2.jar
cglib-nodep-2.1_3.jar

 

 

 

 

 

 

 

你可能感兴趣的:(spring,bean,Hibernate,xml,struts)