Community
Participate
Working Groups
Created attachment 130718 [details] Aspect to reproduce exception Build ID: M20090211-1700 Steps To Reproduce: 1. LTW the attached aspect against Tomcat 2. The exception will occur during Tomcat startup. More information: After a tip from Andy I tried to explicitly exclude clone() from weaving, but my naive approach (see attached aspect) did not resolve the problem.
Created attachment 130719 [details] ajcore dump
I've dug a little deeper into this and it looks like the exception happens when the weaver processes calls to clone(). What I find strange is that this happens in classes that don't match the pointcut at all (I would assume that call(* javax.servlet.jsp.PageContext.*(..)) would preclude all weaving to method calls that are not part of a subclass of PageContext ?!)
After some more experimentation I figured out that the part that is causing the problem is call(* javax.servlet.jsp.PageContext.*(..)) Even with this minimal pointcut (which I believe can be determined statically) LTW gives the BC exception.
can you tell me where to get the jar that I can weave that pointcut against which will show the failure. I don't really want to setup tomcat, I just want to weave against a jar and see the failure.
You can download the binary distro from: http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.9/bin/apache-tomcat-6.0.9.zip You'll have to set x permissions on all shell-scripts in the bin directory, and then you'll have to fix "setclasspath.sh" to set the classpath properly for using LTW, but that should be it. The behavior I observed while trying this is a little odd, because when I start the server, I get no weaving messages whatsoever, but when I call shutdown, I get all the weaving and the errors. Probably a logging problem, but just so you know what to expect.
unsetting the target field which is currently set for something already released