Currently, we have a dependency on tomcat 6.0.14, and moving to 6.0.20 or later (current release is 6.0.32) causes Beanshell to be in its own classloader. In 6.0.14 we get around this by putting things in shared/lib, but this seems to be deprecated.
The behavior that fails is that without the shared lib, Beanshell thinks com.dynamide.Session is a different class from what things loaded from the DynamideServlet think com.dynamide.Session is. This is because the classloader is a namespace, and if you are in a different classloader that is not in your classloader family tree correctly, then they are considered different classes for security purposes.
Todo would be to figure out how to get Beanshell into our classloader. That would be better than figuring out how to cheat tomcat 6.0.20+ into thinking Beanshell is global.
One detail to investigate is: is Beanshell or a Beanshell dependency required in a standard tomcat distribution, and so locked in.
We could always post to the Beanshell dev group or list with a question if we find that it is in the way Beanshell operates. But we'd need to validate that this is the problem first.