The query SELECT COUNT(s.session_id), s.session_id FROM tomcat_sessions s, tomcat_session c GROUP BY c.session_id does not it is supposed to do (as I think). As I figured out it should return count of sessions with their identifiers, but it doesn't works properly on MySQL, and doesn't work on SQL92-compliant database at all - attribute s.session_id isn't grouped but it should be. The query should say: SELECT COUNT(s.session_id), c.session_id FROM tomcat_sessions s, tomcat_session c GROUP BY c.session_id; The bug is present in current CVS version.
This was already submitted a while ago, actually. Unfortunately, none of the committers (me included) are apparently too interested in maintaining the component, so the patch got ignored. I'll apply it. *** This bug has been marked as a duplicate of 7170 ***