控制台报的SQL语法错误,很奇怪
自己在DEBUG模式下运行,程序执行到MaintainService下的deleteBatch下的dao.deleteBatch(idList)就报错
下面是报错的部分信息:
<== Total: 3
==> Preparing: delete form MESSAGE where ID in( ? , ? )
==> Parameters: 2(Integer), 3(Integer)
二月 07, 2017 3:38:37 下午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [com.sgu.tj.servlet.DeleteBatch] in context with path [/MyBatis] threw exception
org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MESSAGE where ID in( 2 , 3 )' at line 1
### The error may involve Message.deleteBatch-Inline
### The error occurred while setting parameters
### SQL: delete form MESSAGE where ID in( ? , ? )
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MESSAGE where ID in( 2 , 3 )' at line 1