[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] FATAL-AspectJWeaverLogger - trouble in: FOUND REASON

Barry Kaplan wrote:

Hmm, I don't see why spring decided to weave that class. But I do need the aspect deployed.



I found out what is going on! In one of my unit tests (which gets run along with the integration tests with LTW enabled) is doing:


private IMocksControl control = createStrictControl();
private DisableableAnnotationBeanConfigurerAspect mockDisabler =
       control.createMock(DisableableAnnotationBeanConfigurerAspect.class);

This is what is creating the CGLIB version of the aspect.

The following seems to prevent the weaving of this particular mock subclass:

<weaver>
<include within="org.opentrader.infra.spring.DisableableAnnotationBeanConfigurerAspect$$EnhancerByCGLIB$$*"/>
</weaver>


I would love to ensure that no EasyMock CGLIB'ed generated classes get weaved by using "*$$EnhancerByCGLIB$$*", but I have lots other classes generated by CGLIB that I /do/ want weaved (eg, Hibernate classes). Maybe I will just have to live without a single "test-all" and run tests unit and integration tests separately.

-barry