栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

报错:org.apache.ibatis.exceptions.PersistenceException

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

报错:org.apache.ibatis.exceptions.PersistenceException

org.apache.ibatis.exceptions.PersistenceException:
org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: java.sql.SQLSyntaxErrorException: 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 'form tb_user where username='zhangsan' and password='1234'' at line 1
### The error may exist in com/zxl/mapper/UserMapper.java (best guess)
### The error may involve com.zxl.mapper.UserMapper.select-Inline
### The error occurred while setting parameters
### SQL: select * form tb_user where username=? and password=?
### Cause: java.sql.SQLSyntaxErrorException: 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 'form tb_user where username='zhangsan' and password='1234'' at line 1
	org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
	org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:153)
	org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)
	org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
	org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76)
	org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:87)
	org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145)
	org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86)
	com.sun.proxy.$Proxy10.select(Unknown Source)
	com.zxl.servlet.LoginServlet.doGet(LoginServlet.java:37)
	com.zxl.servlet.LoginServlet.doPost(LoginServlet.java:58)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:652)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

报错:查看sql语句是否有问题,可在报错信息中查看发生错误的行数,检查sql语句,注意细节,特别是单词、符号的错误。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/727861.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号