[SWS-366] Dynamic AOP proxies for @Endpoints result in IllegalArgumentExceptions Created: 30/May/08  Updated: 21/Jul/08  Resolved: 16/Jun/08

Status: Closed
Project: Spring Web Services
Component/s: Core
Affects Version/s: 1.5.2
Fix Version/s: 1.5.3

Type: Bug Priority: Major
Reporter: Mark Diskin Assignee: Arjen Poutsma
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP



 Description   

When using AspectJ advices on Endpoint classes will causes a "java.lang.IllegalArgumentException: object is not an instance of declaring class" exception.

See these forum posts for the stack and examples.

http://forum.springframework.org/showthread.php?t=54665
http://forum.springframework.org/showthread.php?t=50284

Thanks
Mark



 Comments   
Comment by Arjen Poutsma [ 13/Jun/08 ]

I am working on solving this, but as a workaround, you can use CGLIB-based proxies, rather than dynamic proxies.

Comment by Arjen Poutsma [ 16/Jun/08 ]

I've decided not to fix this issue, because fixing it would break backwards compatibility with older releases.

So the workaround described earlier (using CGLIB proxies by specifying proxy-target-class="true" on the aop:aspectj-autoproxy or aop:config element) is the recommended fix.

I did change the exception thrown, so you now get a nice message, suggesting CGLIB, rather than the IllegalArgumentException thrown from deep in the JDK.

Comment by Arjen Poutsma [ 21/Jul/08 ]

Closing issues in 1.5.3

Generated at Sun Dec 17 06:14:54 UTC 2017 using JIRA 6.4.14#64029-sha1:ae256fe0fbb912241490ff1cecfb323ea0905ca5.