Announcement Announcement Module
Collapse
No announcement yet.
Weblogic load time weaving not working Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Weblogic load time weaving not working

    Hello,
    I'm trying to get load time weaving to work with a BEA Weblogic server 10.

    As described here I added

    Code:
    <context:load-time-weaver />
    to my applicationContext.xml. Then I created this META-INF\aop.xml

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE aspectj PUBLIC "-//AspectJ//DTD//EN" "http://www.eclipse.org/aspectj/dtd/aspectj.dtd">
    <aspectj>
    
      <weaver options="-debug">
        <include within="org.vc.*" />
        <include within="org.vc.dist.*" />
      </weaver>
    
      <aspects>
        <aspect name="org.vc.util.monitor.MonitorAspect" />
      </aspects>
    
    </aspectj>
    The aspect looks like:

    Code:
       @Around("execution(* *(..))")
       public Object doSimpleProfiling(ProceedingJoinPoint pjp) throws Throwable
       {
          StopWatch stopWatch = new StopWatch(pjp.getSignature().toShortString());
          try {
             stopWatch.start(pjp.getSignature().toShortString());
             return pjp.proceed();
         } finally {
             stopWatch.stop();
             System.out.println(stopWatch.shortSummary());
         }
       }
    The problem is the aspect is never executed. The server log states:

    Code:
    18:28:02,625 INFO  org.springframework.web.context.ContextLoader : Root WebApplicationContext: initialization started
    18:28:03,844 INFO  org.springframework.web.context.support.XmlWebApplicationContext : Refreshing [email protected]80e605: display name [Root WebApplicationContext]; startup date [Thu Jan 07 18:28:03 CET 2010]; root of context hierarchy
    18:28:06,360 INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader : Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
    18:28:09,921 INFO  org.springframework.web.context.support.XmlWebApplicationContext : Bean factory for application context [[email protected]80e605]: org.springframework.beans.factory.support.DefaultListableBeanFactory@827875
    18:28:13,672 INFO  org.springframework.context.weaving.DefaultContextLoadTimeWeaver : Determined server-specific load-time weaver: org.springframework.instrument.classloading.weblogic.WebLogicLoadTimeWeaver
    18:28:16,283 INFO  org.springframework.beans.factory.support.DefaultListableBeanFactory : Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@827875: defining beans [org.springframework.context.weaving.AspectJWeavingEnabler#0,org.springframework.context.config.internalBeanConfigurerAspect,loadTimeWeaver,distManager]; root of factory hierarchy
    18:28:16,916 INFO  org.vc.dist.DistManagerImpl : DistManagerImpl Classloader: class weblogic.utils.classloaders.ChangeAwareClassLoader
    18:28:24,338 INFO  org.springframework.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 21713 ms
    Is there a way to get some more logging? I'm out of ideas so I appreciate any help.

    Thanks,
    gwi

  • #2
    did you try to get logging without time-weaver?

    I have used weblogica little, and I have to say is something especial, it needs extra configuration that other application server, like glassfish, don't need.

    Comment


    • #3
      Hi gwi,

      I am having the same problems ... Did you find a solution ?

      Regards
      /Timm

      Comment


      • #4
        no, I ended up using compile time weaving.

        good luck,
        gwi

        Comment

        Working...
        X