Re: [aspectwerkz-user] NoClassDefFoundError on applicatoin init
Alexandre Vasseur <[email protected]> Tue, 17 May 2005 09:08:20 +0200
| Newsgroups | gmane.comp.java.aspectwerkz.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Can you confirm that you are using 2.0 ? This is rather surprising if we look at line 369 in http://cvs.aspectwerkz.codehaus.org/viewrep/aspectwerkz/aspectwerkz4/src/main/org/codehaus/aspectwerkz/definition/SystemDefinitionContainer.java?r=1.12 since AspectWerkzPreProcessor is packed in aspectwerkz-2.0.jar just as the other AW classes that appear in your stacktrace. AW is triggered there since it happens you have a join point in the class "se.exder.servlet.BundleServlet". The AW jars must be along this class (ie in the app server classpath if this class belongs there). -Daspectwerkz.transform.verbose=true may help you perhaps. Alex On 5/17/05, Mattias J <[email protected]> wrote: > Hi again all. > Just yesterday we noticed that AspectWerkz throws NoClassDefFoundErrors > during startup of our web application. The application is run under Caucho > Resin (2.1.16) and one of the servlets that are run on regular intervals, > and thus instantiated at application init, contains joinpoints. Therefore, > during application init, AW throws the error below one time for each > joinpoint. The thing is that the aspect is still applied when the servet is > run... > > We use AW 2.0 and this problem occurs with offline weaving only. The errors > can be removed by placing aspectwerkz-2.0.jar in Resins lib (or the system > classpath), but we do not want to maintain an AW installation on the > deployment servers. > > How can we best track down what is the actual problem? > (Or should we just ignore it, since everything works anyway...?) > > Here is the stacktrace: > java.lang.NoClassDefFoundError: > org/codehaus/aspectwerkz/transform/AspectWerkzPreProcessor > at > org.codehaus.aspectwerkz.definition.SystemDefinitionContainer.dump(SystemDefinitionContainer.java:369) > at > org.codehaus.aspectwerkz.definition.SystemDefinitionContainer.registerClassLoader(SystemDefinitionContainer.java:147) > at > org.codehaus.aspectwerkz.definition.SystemDefinitionContainer.getHierarchicalDefinitionsFor(SystemDefinitionContainer.java:317) > at > org.codehaus.aspectwerkz.definition.SystemDefinitionContainer.getDefinitionsFor(SystemDefinitionContainer.java:225) > at > org.codehaus.aspectwerkz.joinpoint.management.JoinPointManager.getAdviceInfoContainerForJoinPoint(JoinPointManager.java:282) > at > org.codehaus.aspectwerkz.joinpoint.management.JoinPointManager.compileJoinPoint(JoinPointManager.java:230) > at > org.codehaus.aspectwerkz.joinpoint.management.JoinPointManager.loadJoinPoint(JoinPointManager.java:118) > at > se.exder.servlet.BundleServlet.aw$initJoinPoints(BundleServlet.java) > at se.exder.servlet.BundleServlet.<clinit>(BundleServlet.java) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:494) > at java.lang.Class.newInstance0(Class.java:350) > at java.lang.Class.newInstance(Class.java:303) > at java.beans.Beans.instantiate(Beans.java:204) > at java.beans.Beans.instantiate(Beans.java:48) > at > com.caucho.server.http.Application.instantiateServlet(Application.java:3183) > at > com.caucho.server.http.Application.createServlet(Application.java:3104) > at > com.caucho.server.http.Application.loadServlet(Application.java:3065) > at > com.caucho.server.http.Application.initServlets(Application.java:1923) > at com.caucho.server.http.Application.init(Application.java:1849) > at com.caucho.server.http.VirtualHost.init(VirtualHost.java:728) > at > com.caucho.server.http.ServletServer.initHosts(ServletServer.java:887) > at > com.caucho.server.http.ServletServer.initInternal(ServletServer.java:729) > at com.caucho.server.http.ServletServer.init(ServletServer.java:538) > at com.caucho.server.http.ResinServer.init(ResinServer.java:415) > at com.caucho.server.http.ResinServer.main(ResinServer.java:1176) > at com.caucho.server.http.HttpServer.main(HttpServer.java:103) > >