On Nov 23, 2010, at 4:49 PM, Blair Zajac wrote: > > On Nov 23, 2010, at 2:24 AM, Mark Thomas wrote: > >> On 23/11/2010 02:19, Blair Zajac wrote: >> >>> Any suggestions in tracking this down? Would a custom Tomcat build that >>> gets each key and value in a try/catch block be useful? >> >> Almost certainly. As far as I can tell there is a collections object in >> a thread local that is non-null yet returns null for a call to >> iterator(). That seems wrong to me. >> >> The root cause could be a bug in the collection class or it might be a >> side-effect of multiple threads accessing a non-thread-safe collection. >> >> Putting the value.toString() calls inside try-catches should make it >> more robust. I'll do that for 7.0.x and propose it for 6.0.x. >> >> Do let us know what the problem was when you find it. > > Does JNA provide its own clean up methods that I could run at shutdown? I > haven't looked yet to see.
I found the cause, it's an issue with JNA, they should be providing a real iterator() implementation, not one that just returns null. Not that they expected anyone to call toString() on it. http://article.gmane.org/gmane.comp.java.jna.user/4347 I guess it's up to you if you want to handle a case like this. I could see other projects not bothering to provide real implementations of things if they don't expect anything to go looking into their internals. Blair --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org