Mysql报错:the right syntax to use near ''
(2017-07-27 20:24:02)
标签:
badsqlgrammar |
分类: 错误处理 |
1、完整报错信息:
org.springframework.jdbc.BadSqlGrammarException:
2017-07-27T12:14:08.976539876Z ### 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 '' at
line 1
2017-07-27T12:14:08.976551021Z ### The error may involve
com.wyun.platform.rs.dao.custom.UserRecHistoryMapper.addUserRecHistory-Inline
2017-07-27T12:14:08.976558497Z ### The error occurred while
setting parameters
2017-07-27T12:14:08.976565121Z ### SQL: insert into
user_rec_history(user_id, news_id, algo_id, platform) VALUES
2017-07-27T12:14:08.97657157Z ### 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 '' at
line 1
2017-07-27T12:14:08.976578203Z ; bad SQL grammar []; nested
exception is
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 '' at
line 1
2、原因分析:
经常反馈,我线下测试都没有问题的啊,怎么线上跑就有问题了。
兄弟,你组装sql时的值判空了吗?
前一篇:Flink计数器的使用
后一篇:迭代器模式

加载中…