The database will have a maximum amount of time that a database connection can be open but not used. What you are seeing is that connection timeout over night as it sits idle. I would recommend looking at the 'timeBetweenEvictionRunsMillis', 'numTestsPerEvictionRun' and 'minEvictableIdleTimeMillis' configuration settings of the Tomcat Datasource. It may be possible to have Tomcat throwaway the connection once it sits idle for too long.
You could also have the database configuration updated to extend the db session timeout to a value greater than expected idle time of your application.
--Gordon
[Message sent by forum member 'gyorke' (gyorke)]
http://forums.java.net/jive/thread.jspa?messageID=248835