An error encountered during the use of spring+mybatis+oracle.
Finally see the online sharing to solve this problem, mark.
The main problem is that the configuration of the mybatis is problematic. I'm going to copy it right here.
Original link: http://hellostory.iteye.com/blog/1416507
Thank the original author again. Thx!
Checked for database connection pool configuration error (Content.xml)!
When you configure the SQL Server (MySQL same) database connection pool, the property validationquery default value is "SELECT 1",
In the Oracle database connection pool should be set to "validationquery=" Select 1 from Dual ""
SQL Server(mysql same) database connection pool configuration:
<Context> <Resourcename= "Jdbc/myoracle"type= "Javax.sql.DataSource"username= "Test"Password= "Test"Driverclassname= "Oracle.jdbc.driver.OracleDriver"Maxidle= "5"maxwait= "the" validationquery= "Select 1" URL= "Jdbc:oracle:thin:@192.168.1.1:1521:mydb"maxactive= " the" /> </Context>
Oracle database Connection Pool configuration:
<Context> <Resourcename= "Jdbc/myoracle"type= "Javax.sql.DataSource"username= "Test"Password= "Test"Driverclassname= "Oracle.jdbc.driver.OracleDriver"Maxidle= "5"maxwait= "the" validationquery= "Select 1 from dual" URL= "Jdbc:oracle:thin:@192.168.1.1:1521:mydb"maxactive= " the" /> </Context>
Spring+mybatis+oracle ORA-00923: Expected from keyword not found