I am having an application on a tomcat server which is built on spring framework+Hibernate, but when the application,server are idle for 7days and after that if i try to access the application i am getting below error
org.hibernate.exception.JDBCConnectionException: could not execute query
but the mysql is running on the device , where tomcat server is running i have checked it so i restarted the tomcat server then the application is running fine i am not getting any error
my database.xml file for the application running
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="${jdbc.url}"/>
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
</bean>
</beans>
I cant just restart the server when ever i want to access the application is there any permanent solution to this?