Announcement Announcement Module
No announcement yet.
sprng ltw weaver in web app Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • sprng ltw weaver in web app


    I can't make LTW working with Spring rc3 and Aspectj 1.5.2a.
    Is the problem in using LTW together with "autoproxy with cglib forced" ?
    I was able to make the web app deloy in tomcat, but I don't see any advice being envoked.
    I don't seee any weaver trace either, despite "dump" tag specified in aop.xml.

    any advice will be highly appreciated.



    Relevant code fragments are as follows

    ---- aop.xml ------

    <weaver options="-verbose, -showWeaveInfo,
    -XmessageHandlerClass:org.springframework.aop.aspec tj.AspectJWeaverMessageHandler">
    <include within="a.b.c.web..*"/>
    <include within="org.springframework.web.servlet..*" />
    <dump within="a.b.c.web..*"/>

    <aspect name="a.b.c.logic.aop.PerServlet" />
    <aspect name="a.b.c.logic.aop.PerServletAdvice" />



    --- spring config -----
    <?xml version="1.0" encoding="UTF-8"?>

    <bean class="a.b.c.logic.aop.PerServlet" />
    <bean class="a.b.c.logic.aop.PerServletAdvice" />

    <aop:aspectj-autoproxy proxy-target-class="true"/>


    ------------- pointcut -------------------
    public class PerServlet {

    @Pointcut(" execution " +
    "" +
    "( public * a.b.c.web.controller.*.*(..) ) " )
    public void someCall() {}


    --------- advice ---------

    public class PerServletAdvice {

    public Object aroundAdviceTest(ProceedingJoinPoint jp) throws Throwable {

    System.out.println( "__ OK__" );
    Object[] args = jp.getArgs();

    System.out.println( "Entering method :" + jp.getSignature().getName()
    + "request=" + args[0].toString()
    + "response=" + args[1].toString() );

    Object ret = null;
    try {
    ret = jp.proceed(new Object[]{jp.getTarget()});
    System.out.println( "returned=" + ret );
    } catch ( Throwable th ){
    throw th;
    return ret;


    ----------------------- tomcat jvm parameters --------------

    -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 5.5
    -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 5.5
    -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\endorsed\Program Files\Apache Software Foundation\Tomcat 5.5\temp
    -Djava.util.logging.manager=org.apache.juli.ClassLo aderLogManager
    -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\

    aspectjweaver-1.5.2a.ja and aspcjrt-1.5.2a.jar are also placed on tomcat classpath

  • #2
    Well, META-INF/aop.xml was placed under web app deployment root which apparenly is not on tomcat classpath. If META-INF/aop.xml is located in


    or in any jar inside


    everything works fine