Peter Bollen
Peter Bollen

Reputation: 59

AspectJ load-time weaving + Spring 3.0.5.RELEASE + Tomcat 7 not working

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.

Upvotes: 4

Views: 2657

Answers (1)

ams
ams

Reputation: 62772

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

Upvotes: 1

Related Questions