Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-366

Dynamic AOP proxies for @Endpoints result in IllegalArgumentExceptions

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.5.2
    • Fix Version/s: 1.5.3
    • Component/s: Core
    • Labels:
      None
    • 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

        Activity

        Hide
        arjen.poutsma Arjen Poutsma added a comment -

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

        Show
        arjen.poutsma Arjen Poutsma added a comment - I am working on solving this, but as a workaround, you can use CGLIB-based proxies, rather than dynamic proxies.
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        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.

        Show
        arjen.poutsma Arjen Poutsma added a comment - 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.
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Closing issues in 1.5.3

        Show
        arjen.poutsma Arjen Poutsma added a comment - Closing issues in 1.5.3

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            mdiskin Mark Diskin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: