Through spring's jdbctemplate call to the MySQL stored procedure, the following problems appear (previously also used, and did not appear below the problem, tossing large half-day, depressed):
Start reporting the following error:
[INFO]2014-07-01 10:49:15,297 message:loading XML Bean Definitions from class path resource [org/springframework/jdbc/s Upport/sql-error-codes.xml]
[INFO]2014-07-01 10:49:15,413 message:sqlerrorcodes loaded: [DB2, Derby, H2, HSQL, Informix, Ms-sql, MySQL, Oracle, Pos Tgresql, Sybase]
No more error messages, no response in the database. Then, by joining try () catch{}, you can print out the following main error message:
Org.springframework.jdbc.BadSqlGrammarException:CallableStatementCallback; Bad SQL Grammar []; Nested exception is Com.mysql.jdbc.exceptions.MySQLSyntaxErrorException:You has an error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use near "res") ' at line 1
According to the error, it should be a SQL syntax error, but in the navicat execution, no problem, I was depressed.
Create a stored procedure statement Yes, the Navicat tool was created by steps:
CREATE definer= ' root ' @ ' localhost ' PROCEDURE ' huabei_dhqr_id ' (out ' res ' varchar (32))
The quotation marks in the argument are then removed, instead:
CREATE definer= ' root ' @ ' localhost ' PROCEDURE ' huabei_dhqr_id ' (out res varchar (32))
Executable Success!
This article comes from the "Quietboy's blog" blog, please be sure to keep this source http://quietboy.blog.51cto.com/6711298/1432984