4

I am trying to figure out why load-time weaving is not working yet for my web application. For my normal application (not webapp) it is working.

The test-project can be found on github (github/peterbollen/helloLtw): helloLtwAspect

When I start the application, the logs show that the load-time weaver is working (view log). But when I trigger EchoServlet, the EchoAspect is not getting woven in (view log).

Does anyone have an idea? Feel free to check out the code and try yourself (I tested the README :)) Thanks for any advice ;-)

UPDATE 1

Load-time weaving is working when using javaagent aspectjweaver instead of spring-instrument.

Why? Do a search for "Load-Time-Weaving differences between aspectj-weaver and spring-weaver". I can't paste the link (not enough credits :-)).

UPDATE 2

Updated the github code too.

Peter Bollen
  • 59
  • 1
  • 5
  • Are you using eclipse ? do you have AJDT plugin installed ? it's a must have in order to use AspectJ with Spring as far as I know. – Cristiano Fontes Dec 05 '11 at 17:13
  • I'm not using an IDE to run the webapp. I run it using the commandline. The actual can be found at [link](https://github.com/peterbollen/helloLtw/blob/master/helloLtwAspect/README.txt) – Peter Bollen Dec 08 '11 at 12:02

1 Answers1

1

There is a bug in how tomcat 7 supports servlets 3.0 which causes Load Time Weaving to totally beak, details and work around are located at the URLS below.

https://jira.springsource.org/browse/SPR-7440 https://issues.apache.org/bugzilla/show_bug.cgi?id=52549 https://issues.apache.org/bugzilla/show_bug.cgi?id=52444

ams
  • 60,316
  • 68
  • 200
  • 288