I\'ve got a J2EE application which uses JSP pages as front end and Struts2 as controller. I also use Hibernate to map my objects into a MySql DB. when I deploy the application o
Hibernate uses a primitive connection pooling mechanism, which is not suitable for production purposes (it even says that in the log file!). You should always use a connection pooling mechanism, be it the one provided by your container, be it a mechanism bundled in your application (c3p0, for instance). The exception you are seeing is because MySQL closed an "old" connection which Hibernate is still using. You can try to add a JDBC URL option, like "autoReconnect", but that's really not a long-term solution.
Ideally, you should configure your container to supply the connections to your application through JNDI. This is easily done with a "-ds.xml" file in JBoss or with a context.xml for Tomcat.