网页报错显示应用程序异常

org.springframework.jdbc.BadSqlGrammarException:

Error querying 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 ''S NAME,

PRODUCT CLASS NAME,
GUARANTEE METHOD,
LOAN AMOUNT,
LOAN TE' at line 3

The error may exist in file [D:\tomcat\apache-tomcat-7.0.57\webapps\FHADMINM\WEB-INF\classes\mybatis1\information\InterestMapper.xml]

The error may involve InterestMapper.datalistPage-Inline

The error occurred while setting parameters

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 ''S NAME,

PRODUCT CLASS NAME,
GUARANTEE METHOD,
LOAN AMOUNT,
LOAN TE' at line 3
; 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 ''S NAME,
PRODUCT CLASS NAME,
GUARANTEE METHOD,
LOAN AMOUNT,
LOAN TE' at line 3

8个回答

PRODUCT CLASS NAME
这里错了,应该写成:
PRODUCT "CLASS NAME"
用双引号包住

xyt3198
xyt3198 如果有,需要用双引号包住
大约 2 年之前 回复
xyt3198
xyt3198 别名中间不能有空格
大约 2 年之前 回复

Mapper文件是不是自动生成的那种,如果不是,还是仔细查看对比一下吧

weixin_42176653
weixin_42176653 映射到了吗
大约 2 年之前 回复
xyt3198
xyt3198 回复u014266400: 都说要用双引号把包含空格的别名引起来,赶紧试一下啊
大约 2 年之前 回复
u014266400
Jstions 是的
大约 2 年之前 回复

检查tomcat是否有问题。。

mysql数据库版本是不是跟配置不匹配

可以检查看看你sql语法有没错误

很清楚了, mybatis1\information\InterestMapper.xml 文件报错,

S NAME,
PRODUCT CLASS NAME,
GUARANTEE METHOD,
LOAN AMOUNT,
LOAN TE' at line 3

PRODUCT CLASS NAME, 这个是不是 要取个别名? 好像不对,,, 多检查检查这个 文件 :InterestMapper.xml

框架映射不到mapper

js(Java script)脚本可能没有被完全用到

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐