Spring+mybatis+oracle ORA-00923: Expected from keyword not found ____oracle

Source: Internet
Author: User
Tags connection pooling
An error encountered during the use of spring+mybatis+oracle.

Finally see online sharing to solve this problem, mark.

The main problem is that the MyBatis configuration is problematic. I copied it directly below.

Original link: http://hellostory.iteye.com/blog/1416507

Thanks again to the original author. Thx.

The database connection pool configuration error (Content.xml) was checked.

When configuring SQL Server (MySQL) database connection pooling, the default value of the property Validationquery is "Select 1".

The Oracle database connection pool should be set to "validationquery=" Select 1 from Dual ""

SQL Server Watts (same as MySQL) database connection pool configuration:

<Context>  
    <resource  
        name= "jdbc/myoracle"  
        type= "Javax.sql.DataSource"  
        username= "test"  
        password= "test"  
        driverclassname= "Oracle.jdbc.driver.OracleDriver"  
        maxidle= "5"   
        maxwait= "5000"  
      validationquery= "Select 1"  
        url= "Jdbc:oracle:thin:@192.168.1.1:1521:mydb"  
        maxactive= "  
     >  

Oracle database Connection Pool configuration:

 <Context> <resource name= "jdbc/myoracle" type= "Javax.sql.DataSource" use   
        Rname= "test" password= "test" driverclassname= "Oracle.jdbc.driver.OracleDriver" maxidle= "5" maxwait= "5000" validationquery= "SELECT 1 from Dual" url= "jdbc:oracle:thin:@192.168.1.1:1521:my db "maxactive="/> </context> 
Related Article

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.