Exception information:
ERROR Transactioninterceptor-application Exception overridden by rollback exception
Problem Analysis:
The main reason is that the connection time is too long and the failure is caused. That is, the connection that the program obtains is invalidated, and a failed connection is requested again to report that exception.
Problem solving:
Since the connection obtained by the program has been invalidated, it should not be used for the failed connection, but should be a valid connection again.
The following sections are the configuration information for connection pooling:
<bean id= "DataSource" class= "Org.apache.commons.dbcp.BasicDataSource" destroy-method= "Close" >
< Property Name= "Driverclassname" value= "${driver}"/>
<property name= "url" value= "${url}"/>
< Property name= "username" value= "${username}"/>
<property name= "password" value= "${password}"/>
<property name= maxactive "value="/> <property name=
"maxidle" value= "/> <property"
Name= "maxwait" value= "/>" <property name=
"Defaultautocommit" value= "true"/>
***<span Style = "Background-color:rgb (255, 0, 0);" ><property name= "Validationquery" value= "SELECT * from dual"/></span>***
</bean>
This configuration is mainly to add a bold italic part of the configuration, that is, <property name= "validationquery" value= "SELECT * from Dual"/>, her main role is to determine whether the connection is valid before the connection is used, Not valid, it will be retrieved from the connection pool.
Article main information source: http://my.oschina.net/tianzimensheng/blog/65225
, the author encounters the exception is basically similar to the original, using this method to solve, the same can solve the problem. It is essential to confirm the connection problem.