I can't give you a solution but, if your problem is to untangle the exceptions, here is my suggesstion for what you should look at
...which from my understanding means, that your hibernate instance is not able to connect to the
mysql instance correctly or the connection gets dropped during execution of your
application. Might be a firewall/network issue or a hibernate DS configuration issue.
As stated, I'm not sure.
Hope there're some usefull pointers in it.
1. Make it run - 2. Make it run correctly - 3. Make it pretty OR fast/small - 4. ??? - 5. Profit