Announcement Announcement Module
No announcement yet.
AOP issue after upgrading from Spring 2.0.6 to 2.5.3 Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • AOP issue after upgrading from Spring 2.0.6 to 2.5.3


    I am currently facing an AOP issue after upgrading to Spring 2.5.3.

    I am using Spring Web Services 1.5 and especially the AbstractFaultCreatingValidatingMarshallingPayloadE ndpoint (

    I have defined a pointcut for intercepting all calls to the "invoke" method which is defined in the MessageEndpoint interface.

    The pointcut looks as follows:

    <aop: pointcut id="loggingPointcut" 
    	expression="execution(* invoke(..))" />
    <aop: aspect ref="loggingInterceptor">
    	<aop:after-throwing pointcut-ref="loggingPointcut" method="logExceptions" throwing="incoming" />
    </aop: aspect>
    The mentioned AbstractFaultCreatingValidatingMarshallingPayloadE ndpoint makes it possible to apply regular Spring MVC Validator classes to the SOAP's payload.

    The issue now is that validation is not applied anymore after the upgrade. But when I remove the pointcut definition in the context definition, everything works fine again as before the upgrade.

    It seems that the proxied class does not invoke a method which actually triggers the validation (in Spring WS).

    Any help is highly appreciated.

    Last edited by mkoster; Apr 29th, 2008, 03:08 AM.

  • #2
    I found out that switching the "proxy-target-class" from "true" (CGLIB-based proxies) to "false" ("JDK Proxies") works with Spring 2.5.3:
    	<aop: config proxy-target-class="false">
    		<!-- pointcut for Logging -->
    		<aop: pointcut id="loggingPointcut" 
    			expression="execution(* invoke(..))" />
    When I set this attribute to "false" and use a JDK proxy, the Spring MVC validator is invoked from the corresponding endpoint as expected, while AOP still works. This is not the case when using CGLIB proxies anymore in Spring 2.5.3.

    But that does not really explain to me why it worked in Spring 2.0.6. In the Spring changelogs I can not find a reasonable explanation for that behaviour. We used CGLIB proxies without any problems since then.

    Does anyone have an idea why there is this strange difference in the behavior?

    Last edited by mkoster; Apr 29th, 2008, 03:07 AM.