SOLVED: When I updated my spring libraries I also updated aspectj to 1.6.5. Downgrading the aspectj libraries by micro version it now seems to work fine with aspectj 1.6.1.
Hello community,
I recently updated from Spring 3.0.0 to 3.0.5. It turned out that the TomcatInstrumentableClassLoader won't weave any @Configurable classes anymore (using LTW). The aspect seems to be registered correctly:
But the classes annotated with @Configurable aren't advised by it. These are MISSING:Code:[TomcatInstrumentableClassLoader@17a4989] info register aspect org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect
Other aspects however are woven correctly.Code:[TomcatInstrumentableClassLoader@11946c2] weaveinfo Join point 'initialization(void org.springframework.beans.factory.aspectj.ConfigurableObject.<init>())' in Type 'xxx.model.impl.User' (User.java:53) advised by before advice from 'org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect' (AbstractDependencyInjectionAspect.aj:78) [with runtime test]
Can anyone confirm this? Is it a bug, or did I miss something?
Regards Jakob
PS: I did neither change aop.xml nor context.xml (for the server) which worked fine.
EDIT: The unittests work fine with the standard instrumentable classloader
EDIT: Seems NOT to be a version problem. It just occasionally occurs.Code:... [AppClassLoader@1858610] info using configuration file:/home/jakob/source/java/xxx/WebContent/WEB-INF/lib/org.springframework.aspects-3.0.5.RELEASE.jar!/META-INF/aop.xml ... [AppClassLoader@1858610] info register aspect org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect ... [AppClassLoader@1858610] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified [AppClassLoader@1858610] weaveinfo Extending interface set for type 'xxx.model.impl.User' (User.java) to include 'org.springframework.beans.factory.aspectj.ConfigurableObject' (AnnotationBeanConfigurerAspect.aj)
I suspect the spring context not to be available when weaving starts, since I (and others) came across similar issues.
I'll try to narrow it down tomorrow...


Reply With Quote