Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] aop.xml not being picked up

Hi William,

The weaver looks on the classpath of the classloader it is attached to
in order to find aop.xmls.  Here it looks like
TomcatInstrumentableClassLoader can find the one in spring aspects.
However, isn't your app being loaded by a different (sub?)classloader
- are you running with -javaagent to achieve ltw here? or just relying
on the application context configuration?

You will probably find more users running in this configuration on the
Spring AOP forum:
http://forum.springsource.org/forumdisplay.php?f=31
you might want to ask there.

cheers,
Andy

On 5 August 2010 06:40, William Briggs <wrbriggs@xxxxxxxxx> wrote:
> I have a Spring-based webapp with which I have been successfully using
> Spring AOP to perform logging at specific pointcuts. I now have to perform
> some logging and profiling on objects and methods which are not managed by
> Spring; in order to do so, I decided to change from Spring AOP to AspectJ
> LTW. My Spring aspect is already annotated in using @Aspect, @Pointcut and
> @Around/@Before annotations, so I thought it would be a relatively
> straightforward process.
>
> After monkeying with the webapp classloader, I have successfully managed to
> get the classloader to find Spring aspect; at least I believe I have, based
> on this logging output:
> [TomcatInstrumentableClassLoader@13b3d473] info AspectJ Weaver Version 1.6.9
> built on Monday Jul 5, 2010 at 15:28:35 GMT
> [TomcatInstrumentableClassLoader@13b3d473] info register classloader
> org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader@13b3d473
> [TomcatInstrumentableClassLoader@13b3d473] info using configuration
> file:/usr/local/apache-tomcat-6.0.26/webapps/<mywebapp>/WEB-INF/lib/spring-aspects-3.0.2.RELEASE.jar!/META-INF/aop.xml
> [TomcatInstrumentableClassLoader@13b3d473] info register aspect
> org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect
> [TomcatInstrumentableClassLoader@13b3d473] info register aspect
> org.springframework.transaction.aspectj.AnnotationTransactionAspect
>
> However, as can be seen in the output, it is still not picking up my aop.xml
> located in my web app at META-INF/aop.xml. I am open to suggestions on
> additional avenues I can take to debug this problem.
>
> Thanks,
> Will
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>


Back to the top