Hi guys,
I'm running into a CGLIB issue when trying to setup spring-aop on :

  <jaxws:client id="metierServicePortType"
serviceClass="....MetierServicePortType"
    address="${metierService.url}">
  </jaxws:client>

My monitoring framework uses spring-AOP (ApscetJ syntax) to instrument beans
:

    @Around( "SystemArchitecture.externalWebServiceCall()" )
    public Object log( ProceedingJoinPoint jp ) { ... }

    @Pointcut( "bean(*PortType)" )
    public void externalWebServiceCall() {}

With this configuration I get an exception :

Caused by: org.springframework.aop.framework.AopConfigException: Could not
generate CGLIB subclass of class [class $Proxy169]: Common causes of this
problem include using a final class or a non-visible class; nested exception
is java.lang.IllegalArgumentException: Cannot subclass final class class
$Proxy169
 at
org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:213)
at
org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:110)

>From my understanding, <jaxws:client> creates a CGLIB proxy as web service
client bean, and my AOP frameworks also tries to create one BUT the first
CGLIB class is created as FINAL.
Is there any workaround ?

Nicolas

Reply via email to