1 Reply Latest reply: Apr 5, 2013 4:00 AM by 794714 RSS

    Loading AspectJ from application classpath

    912224
      Hi

      I have written a Spring-aop interceptor for profiling public methods, and this application is deployed in Weblogic 11g. Since spring-aop is dependent on aspectjrt.jar & aspectweaver.jar I have included these in the application classpath. However when the spring applcation context is initialized an exception is thrown;
      Caused by: java.lang.ClassNotFoundException: org.aspectj.lang.JoinPoint
      But if I include these 2 jars in startWeblogic.cmd as
      CLASSPATH=%CLASSPATH%;c:\spring\aspectjrt.jar;C\spring\aspectjweaver.jar
      everything works fine.
      What could be the reason for these jars not being loaded from app classpath. All the other jars are loaded from app classpath just fine.

      I also tried ;
      <prefer-application-packages>
      <package-name>org.aspectj.*</package-name>
      <package-name>org.springframework.*</package-name>
      </prefer-application-packages>
      in weblogic-application.xml but that didn't work.