spalma
May 28th, 2005, 11:37 AM
hi,
I have integrated Struts with Spring by using DelegatingRequestProcessor. It works fine. Now I want to intercept Struts actions method call. I have tried this configuration:
(in struts-config.xml)
<action path="/of_add" parameter="reqCode" name="proposalForm" input="/projects/editProposal.jsp" scope="request" validate="true">
<forward name="Success" path="/projects/confirm.jsp" />
</action>
...
(in spring configuration)
<bean name="/of_add" class="it.palma.action.ProposalActions">
<property name="projectService">
<ref bean="projectService" />
</property>
</bean>
...
<bean id="securityAdvice" class="it.palma.aop.SecurityAdvice">
</bean>
<bean id="securityAutoProxy" class="org.springframework.aop.framework.autoproxy.BeanNa meAutoProxyCreator">
<property name="beanNames">
<list>
<value>/of_add</value>
<value>/of_search</value>
</list>
</property>
<property name="interceptorNames">
<list>
<value>securityAdvice</value>
</list>
</property>
</bean>
but I get this error:
Context initialization failed
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name '/of_add' defined in ServletContext resource [/WEB-INF/job-struts-servlet.xml]: Initialization of bean failed; nested exception is org.aopalliance.aop.AspectException: null
java.lang.IllegalStateException: Callback Lnet/sf/cglib/proxy/MethodInterceptor; is not assignable to Lnet/sf/cglib/proxy/MethodInterceptor;
Does anybody have any suggestion?
Thanks
stefano
I have integrated Struts with Spring by using DelegatingRequestProcessor. It works fine. Now I want to intercept Struts actions method call. I have tried this configuration:
(in struts-config.xml)
<action path="/of_add" parameter="reqCode" name="proposalForm" input="/projects/editProposal.jsp" scope="request" validate="true">
<forward name="Success" path="/projects/confirm.jsp" />
</action>
...
(in spring configuration)
<bean name="/of_add" class="it.palma.action.ProposalActions">
<property name="projectService">
<ref bean="projectService" />
</property>
</bean>
...
<bean id="securityAdvice" class="it.palma.aop.SecurityAdvice">
</bean>
<bean id="securityAutoProxy" class="org.springframework.aop.framework.autoproxy.BeanNa meAutoProxyCreator">
<property name="beanNames">
<list>
<value>/of_add</value>
<value>/of_search</value>
</list>
</property>
<property name="interceptorNames">
<list>
<value>securityAdvice</value>
</list>
</property>
</bean>
but I get this error:
Context initialization failed
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name '/of_add' defined in ServletContext resource [/WEB-INF/job-struts-servlet.xml]: Initialization of bean failed; nested exception is org.aopalliance.aop.AspectException: null
java.lang.IllegalStateException: Callback Lnet/sf/cglib/proxy/MethodInterceptor; is not assignable to Lnet/sf/cglib/proxy/MethodInterceptor;
Does anybody have any suggestion?
Thanks
stefano