You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Ricardo Gladwell (JIRA)" <ji...@apache.org> on 2008/03/12 13:20:08 UTC
[jira] Created: (WW-2547) Using actions proxied with Spring AOP
throws exception
Using actions proxied with Spring AOP throws exception
------------------------------------------------------
Key: WW-2547
URL: https://issues.apache.org/struts/browse/WW-2547
Project: Struts 2
Issue Type: Bug
Components: Plugin - Spring
Affects Versions: 2.0.9
Environment: Windows 2000, Struts 2.0.9. Spring 2.0.6, Java 5 Update 14, Apache Tomcat/5.5.25
Reporter: Ricardo Gladwell
When using Spring AOP proxied action classes with Struts2 throws exception (see attached project and stack trace).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-2547) Using actions proxied with Spring AOP
throws exception
Posted by "Don Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2547?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Don Brown updated WW-2547:
--------------------------
Fix Version/s: 2.1.3
> Using actions proxied with Spring AOP throws exception
> ------------------------------------------------------
>
> Key: WW-2547
> URL: https://issues.apache.org/struts/browse/WW-2547
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - Spring
> Affects Versions: 2.0.9
> Environment: Windows 2000, Struts 2.0.9. Spring 2.0.6, Java 5 Update 14, Apache Tomcat/5.5.25
> Reporter: Ricardo Gladwell
> Fix For: 2.1.3
>
> Attachments: stacktrace.log, test.zip
>
>
> When using Spring AOP proxied action classes with Struts2 throws exception (see attached project and stack trace).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WW-2547) Using actions proxied with Spring AOP
throws exception
Posted by "Don Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2547?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Don Brown resolved WW-2547.
---------------------------
Resolution: Won't Fix
Fix Version/s: (was: 2.1.3)
Agreed, Struts 2 doesn't support proxies for interceptors and actions, and the workaround seems to fix your issue. However, if you really feel Struts 2 should support proxies, please open a new feature ticket.
> Using actions proxied with Spring AOP throws exception
> ------------------------------------------------------
>
> Key: WW-2547
> URL: https://issues.apache.org/struts/browse/WW-2547
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - Spring
> Affects Versions: 2.0.9
> Environment: Windows 2000, Struts 2.0.9. Spring 2.0.6, Java 5 Update 14, Apache Tomcat/5.5.25
> Reporter: Ricardo Gladwell
> Attachments: stacktrace.log, test.zip
>
>
> When using Spring AOP proxied action classes with Struts2 throws exception (see attached project and stack trace).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-2547) Using actions proxied with Spring AOP
throws exception
Posted by "Ricardo Gladwell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2547?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ricardo Gladwell updated WW-2547:
---------------------------------
Attachment: test.zip
Sampe project to test.
> Using actions proxied with Spring AOP throws exception
> ------------------------------------------------------
>
> Key: WW-2547
> URL: https://issues.apache.org/struts/browse/WW-2547
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - Spring
> Affects Versions: 2.0.9
> Environment: Windows 2000, Struts 2.0.9. Spring 2.0.6, Java 5 Update 14, Apache Tomcat/5.5.25
> Reporter: Ricardo Gladwell
> Attachments: stacktrace.log, test.zip
>
>
> When using Spring AOP proxied action classes with Struts2 throws exception (see attached project and stack trace).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2547) Using actions proxied with Spring AOP
throws exception
Posted by "Bob Tiernay (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44216#action_44216 ]
Bob Tiernay commented on WW-2547:
---------------------------------
After looking at the supplied applicationContext.xml, it would seem as though the beanNames property is casting too wide of a net within the following bean definition:
- <bean id="proxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
- <property name="beanNames">
<value>*</value>
</property>
- <property name="interceptorNames">
- <list>
<value>traceInterceptor</value>
</list>
</property>
</bean>
Not only does this apply a proxy to user level spring managed beans, but also to those of struts system level beans (see struts-default.xml) since the spring plugin overrides the StrutsObjectFactory. In this particular case, it looks as though some MethodFilterInterceptor derived interceptor is being proxied inappropriately (infered from the excludeMethods property in the stack trace).
I would recommend trying to reduce the scope of the beanNames property to actions in a particular package, etc.
> Using actions proxied with Spring AOP throws exception
> ------------------------------------------------------
>
> Key: WW-2547
> URL: https://issues.apache.org/struts/browse/WW-2547
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - Spring
> Affects Versions: 2.0.9
> Environment: Windows 2000, Struts 2.0.9. Spring 2.0.6, Java 5 Update 14, Apache Tomcat/5.5.25
> Reporter: Ricardo Gladwell
> Fix For: 2.1.3
>
> Attachments: stacktrace.log, test.zip
>
>
> When using Spring AOP proxied action classes with Struts2 throws exception (see attached project and stack trace).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (WW-2547) Using actions proxied with
Spring AOP throws exception
Posted by "Ricardo Gladwell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43502#action_43502 ]
rgladwell edited comment on WW-2547 at 3/12/08 5:32 AM:
---------------------------------------------------------------
Sample project to test.
was (Author: rgladwell):
Sampe project to test.
> Using actions proxied with Spring AOP throws exception
> ------------------------------------------------------
>
> Key: WW-2547
> URL: https://issues.apache.org/struts/browse/WW-2547
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - Spring
> Affects Versions: 2.0.9
> Environment: Windows 2000, Struts 2.0.9. Spring 2.0.6, Java 5 Update 14, Apache Tomcat/5.5.25
> Reporter: Ricardo Gladwell
> Attachments: stacktrace.log, test.zip
>
>
> When using Spring AOP proxied action classes with Struts2 throws exception (see attached project and stack trace).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2547) Using actions proxied with Spring AOP
throws exception
Posted by "sutter2k (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44332#action_44332 ]
sutter2k commented on WW-2547:
------------------------------
Need more details on this bug. attach spring config and struts.xml.
re:Caught OgnlException while setting property 'excludeParams' on type '$Proxy11'.
ognl.NoSuchPropertyException: $Proxy11.excludeParams
Which object are you wiring with spring? The parameter or chaining interceptor?
Is this an cglib proxy?
This could be user error. Any time properties are copied the properties, of the cglib proxy should be excluded(just the properties of the bean underneath should be copied).
> Using actions proxied with Spring AOP throws exception
> ------------------------------------------------------
>
> Key: WW-2547
> URL: https://issues.apache.org/struts/browse/WW-2547
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - Spring
> Affects Versions: 2.0.9
> Environment: Windows 2000, Struts 2.0.9. Spring 2.0.6, Java 5 Update 14, Apache Tomcat/5.5.25
> Reporter: Ricardo Gladwell
> Fix For: 2.1.3
>
> Attachments: stacktrace.log, test.zip
>
>
> When using Spring AOP proxied action classes with Struts2 throws exception (see attached project and stack trace).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-2547) Using actions proxied with Spring AOP
throws exception
Posted by "Ricardo Gladwell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2547?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ricardo Gladwell updated WW-2547:
---------------------------------
Attachment: stacktrace.log
Stack trace.
> Using actions proxied with Spring AOP throws exception
> ------------------------------------------------------
>
> Key: WW-2547
> URL: https://issues.apache.org/struts/browse/WW-2547
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - Spring
> Affects Versions: 2.0.9
> Environment: Windows 2000, Struts 2.0.9. Spring 2.0.6, Java 5 Update 14, Apache Tomcat/5.5.25
> Reporter: Ricardo Gladwell
> Attachments: stacktrace.log
>
>
> When using Spring AOP proxied action classes with Struts2 throws exception (see attached project and stack trace).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2547) Using actions proxied with Spring AOP
throws exception
Posted by "sutter2k (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44333#action_44333 ]
sutter2k commented on WW-2547:
------------------------------
Please close ticket, not a bug.
Re: test.zip
in struts.xml
<action name="test" class="test.TestAction">
<result type="freemark">success.ftl</result>
</action>
change to freemarker.
In applicationContext.xml
change beanNames from * to testA*
<property name="beanNames">
<value>testA*</value>
</property>
Application works fine.
You do not want to auto create proxys for interceptors and various struts 2 internals without carefully examining the side effects.
> Using actions proxied with Spring AOP throws exception
> ------------------------------------------------------
>
> Key: WW-2547
> URL: https://issues.apache.org/struts/browse/WW-2547
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - Spring
> Affects Versions: 2.0.9
> Environment: Windows 2000, Struts 2.0.9. Spring 2.0.6, Java 5 Update 14, Apache Tomcat/5.5.25
> Reporter: Ricardo Gladwell
> Fix For: 2.1.3
>
> Attachments: stacktrace.log, test.zip
>
>
> When using Spring AOP proxied action classes with Struts2 throws exception (see attached project and stack trace).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.