Results 1 to 1 of 1

Thread: TomcatInstrumentableClassLoader fails with LTW and @Configurable

  1. #1

    Default TomcatInstrumentableClassLoader fails with LTW and @Configurable

    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:
    Code:
    [TomcatInstrumentableClassLoader@17a4989] info register aspect org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect
    But the classes annotated with @Configurable aren't advised by it. These are MISSING:
    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]
    Other aspects however are woven correctly.
    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
    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)
    EDIT: Seems NOT to be a version problem. It just occasionally occurs.
    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...
    Last edited by Jakob O.; Dec 30th, 2010 at 09:20 AM. Reason: Additional info

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •