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

        mdiskin Mark Diskin created issue -
        arjen.poutsma Arjen Poutsma made changes -
        Field Original Value New Value
        Fix Version/s 1.5.3 [ 10982 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        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.
        arjen.poutsma Arjen Poutsma made changes -
        Resolution Won't Fix [ 2 ]
        Status In Progress [ 3 ] Resolved [ 5 ]
        arjen.poutsma Arjen Poutsma made changes -
        Summary Endpoints do not support AOP Advices. Dynamic AOP proxies for @Endpoints result in IllegalArgumentExceptions
        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
        arjen.poutsma Arjen Poutsma made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        6d 3h 49m 1 Arjen Poutsma 06/Jun/08 3:22 AM
        In Progress In Progress Resolved Resolved
        9d 23h 24m 1 Arjen Poutsma 16/Jun/08 2:47 AM
        Resolved Resolved Closed Closed
        35d 19h 19m 1 Arjen Poutsma 21/Jul/08 10:07 PM

          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: