[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] LTW not "running" in my WebApp
|
Okay. The weaving STILL isn't working for me. Here is what I've done:
1. Created a Web-App called AspectWeb.
2. Added a servlet to this Web-App called AspectServlet with my Aspect
included as a Jar in the Web-Inf/lib
3. To the doGet() method of the servlet added a TestClass tc = new
TestClass(1,2); surrounded by a few system.out statements
4. My Tomcat context.xml file (I have only one for the whole server and it
is in Catalina_Home/conf) contains:
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Loader
loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"
/>
<WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>
5. My Tomcat's common lib folder has in it
org.springframework.instrument.tomcat-3.0.0.RELEASE.jar which has the
TomcatInstrumentableClassLoader contained in it.
6. I have configured Spring in my Web-app to have <context:load-time-weaver
/> in it. (Note: I am not using Spring for anything at all other than this
declaration.
7. When I start up my server LTW seems to be enabled because i see:
...
[TomcatInstrumentableClassLoader@111a3a4] info AspectJ Weaver Version 1.6.11
built on Tuesday Mar 15, 2011 at 15:31:04 GMT
[TomcatInstrumentableClassLoader@111a3a4] info register classloader
org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader@111a3a4
[TomcatInstrumentableClassLoader@111a3a4] info using configuration
file:/D:/Projects/Workspaces/LTSA-STS/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/AspectWeb/WEB-INF/lib/RequestAOPT1.jar!/META-INF/aop.xml
[TomcatInstrumentableClassLoader@111a3a4] info using configuration
file:/D:/Projects/Workspaces/LTSA-STS/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/AspectWeb/WEB-INF/lib/spring-aspects-3.0.5.RELEASE.jar!/META-INF/aop.xml
[TomcatInstrumentableClassLoader@111a3a4] info register aspect
jon.sandbox.aspect.TestAspect
[TomcatInstrumentableClassLoader@111a3a4] info register aspect
org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect
[TomcatInstrumentableClassLoader@111a3a4] info register aspect
org.springframework.scheduling.aspectj.AnnotationAsyncExecutionAspect
[TomcatInstrumentableClassLoader@111a3a4] info register aspect
org.springframework.transaction.aspectj.AnnotationTransactionAspect
...
8. However, when I access my servlet the Aspect is not run...
I've tried cleaning, deleting, reinstalling of Tomcat and my web-app over
and over again. I'm baffled! When I run it stand alone via a main() method
using a -javaagent for the weaving it works great--as soon as I use it from
my web-app's servlet NO LUCK!
What am I missing?
--
View this message in context: http://aspectj.2085585.n4.nabble.com/LTW-not-running-in-my-WebApp-tp3612958p3614777.html
Sent from the AspectJ - users mailing list archive at Nabble.com.