I have a simple web app developed with Spring 3 and Hibernate 3 deployed on tomcat 7. My application works fine till the Database server is shutdown. After the database server is turned on again I expected the app to work but I needed to restart tomcat to make the appl work again. If not I get the following exception
org.springframework.web.util.NestedServletException: Request processing failed; nested >exception is org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could ?>not execute query; uncategorized SQLException for SQL
A snapshot of the database properties used is below
<bean id="OradataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy- method="close">
<property name="driverClassName" value="oracle.jdbc.OracleDriver"/>
<property name="url" value="xyz"/>
<property name="username" value="xyz"/>
<property name="password" value="xyz"/>
</bean>
<bean id="OraDbHibernateProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="properties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
<prop key="log4j.logger.net.sf.hibernate">trace</prop>
</props>
</property>
</bean>
Any help is appreciated. Thanks
You need to add 2 more properties.