I have written a Spring-aop(v3.0.5) 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(to gether wiith all the spring jars). However when the spring application context is initialized an exception is thrown;
If the 2 jars aspectjrt.jar & aspectweaver.jar are placed in startWeblogic.cmd classpath everything works fine.Code:Caused by: java.lang.NoClassDefFoundError at org.springframework.aop.aspectj.AbstractAspectJAdvice.class$(AbstractAspectJAdvice.java:64) at org.springframework.aop.aspectj.AbstractAspectJAdvice.<clinit>(AbstractAspectJAdvice.java:64) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) ............ Caused by: java.lang.ClassNotFoundException: org.aspectj.lang.JoinPoint at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
AbstractAspectJAdvice.java:64 has the code
If I do the exact same line from my source code without including aspectj jars in startWeblogic.cmd classpath I get no errors, hance I am thinking the issue is with spring loading aspectj classes.Code:protected final static String JOIN_POINT_KEY = JoinPoint.class.getName();
Would like to know if anyone faced/resoled similar issues and how does spring-aop loads aspectj


Reply With Quote
