Invalid bound statement (not found)错误的可能原因

简介: Invalid bound statement (not found)错误的可能原因

今天在执行sql的时候遇到这个问题,按说非常简单,但是出现问题的原因却不是唯一的,所以总一下:


1.检查xml文件所在package名称是否和Mapper interface所在的包名


<mapper namespace="me.tspace.pm.dao.UserDao">

mapper的namespace写的不对!!!注意系修改。


2.UserDao的方法在UserDao.xml中没有,然后执行UserDao的方法会报此


3. UserDao的方法返回值是List<User>,而select元素没有正确配置ResultMap,或者只配置ResultType!


4. 如果你确认没有以上问题,请任意修改下对应的xml文件,比如删除一个空行,保存.问题解决


5.看下mapper的XML配置路径是否正确


目录
相关文章
|
6月前
|
SQL Java 数据库连接
sql injection violation, syntax error: syntax error, error in :‘**‘expect IDENTIFIER, actual IDENTIF
sql injection violation, syntax error: syntax error, error in :‘**‘expect IDENTIFIER, actual IDENTIF
118 0
|
2月前
|
Perl
报错:error Parsing error: x-invalid-end-tag
报错:error Parsing error: x-invalid-end-tag
|
5月前
|
XML Java 数据库连接
BindingException:Invalid bound statement not found
BindingException:Invalid bound statement not found
28 0
|
6月前
|
编译器
解决Invalid bound statement (not found)错误~
解决Invalid bound statement (not found)错误~
|
9月前
|
JSON Java 数据格式
JSONException: illegal identifier : \pos 1 异常报错问题
JSONException: illegal identifier : \pos 1 异常报错问题
455 0
|
SQL Java 数据库连接
Invalid bound statement (not found) 问题处理
您好,我是码农飞哥,感谢您阅读本文!本文将介绍使用MyBatis时出现的一些常见问题。
203 0
|
Go iOS开发
The operation couldn’t be completed. Unable to log in with account 'myappleid'. An unexpected failure occurred while logging in (Underlying error code 1100).解决方法
The operation couldn’t be completed. Unable to log in with account 'myappleid'. An unexpected failure occurred while logging in (Underlying error code 1100).解决方法
348 0
|
Linux
WARNING: Re-reading the partition table failed with error 22: Invalid argument
在划分磁盘分区时,遇到错误“WARNING: Re-reading the partition table failed with error 22: Invalid argument” 如下所示: [root@DB-Server u02]# fdisk -l   Disk /dev/sda: 500.
2469 0
解决MybatisPlus中Invalid bound statement (not found)..错误
解决MybatisPlus中Invalid bound statement (not found)..错误
326 0
解决MybatisPlus中Invalid bound statement (not found)..错误
|
XML 数据格式
Invalid bound statement (not found)
想必这个问题在网上已经泛滥了,但是他们都是同一个答案,我来copy一下: 1.检查xml文件所在package名称是否和Mapper interface所在的包名 mapper的namespace写的不对!!!注意系修改。
3400 0