ERROR Transactioninterceptor-application Exception overridden by rollback exception

Source: Internet
Author: User
Tags connection pooling rollback

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.