[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

Windows XP


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.



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 Oct 21 11:14:07 UTC 2018 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.