https://issues.apache.org/bugzilla/show_bug.cgi?id=43867
--- Comment #34 from Dan Armbrust <[EMAIL PROTECTED]> 2008-07-08 09:21:44 PST --- (In reply to comment #33) > Re comment 25: > > Dan, > > Code from deployed webapps is never executed in the main thread. Tomcat > creates > worker threads for that. So what your app is doing is the second thing I > mentioned in comment 23: It's adding code to some hook (VM shutdown hooks, for > example). > Aaron, I'm sorry, but unless you can show otherwise in a debugger, you are just making incorrect assumptions. My debugger shows me that the Tomcat shutdown process is not spawned to other threads - it is in fact, done by the main thread. That is where the clearReferences() call is made. Now, I do agree, that the error itself is probably being printed from a finalizer or a shutdown hook which is triggered by the clearReferences call - and since that is a new and short lived thread, I don't think my debugger is catching it. The reason that this hits and confuses so many web developers is because I don't think they made the mistake - at least not directly. My suspicion now is strongly pointing at common 3rd party code - likely struts, or one of its dependencies that many people use. But so far, I can't find any code my included libraries that are setting up shutdown hooks. Also, I still don't understand why log4j can't print a stack trace with this error - we don't want the stack trace of the thread that set the variable to null, we want the stack trace of the the thread that tried to use the null variable. Why wouldn't that be available? Because it seems that the only way to track down and close this issue is to find the class with the finalizer. And unless I can figure out how to make my debugger pause newly spawned threads, I don't know how else to find it. I thought I was on to something with the struts ValidationForm class - since that is the class that triggers the problem in my webapp - but in looking through that code, I can't find anything suspicious. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]