Mybatis错误(一)org.apache.ibatis.exceptions.PersistenceException
在映射文件中,通过parameterType指定输入参数的类型,类型可以是简单类型、hashmap、pojo的包装类型。在测试包装类型过程中产生了一个错误:org.apache.ibatis.exceptions.PersistenceException、错误如下。

映射文件如下:

我们来看着错误提示:There is no getter for property named 'UserCustom' in 'class com.murongtech.mybatis.domain.UserQueryVo' 大致意思是在UserQueryVo类中属性UserCustom 没有相应的get方法。这里就是问题的所在了,我在SQL中使用#{UserCustom.sex},而我在UserQueryVo定义的属性是小写开头的userCustom。所以换成小写,问题就解决了。
Mybatis错误(一)org.apache.ibatis.exceptions.PersistenceException的更多相关文章
- mybatis bug之org.apache.ibatis.exceptions.PersistenceException:
		详细报错信息: org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: java. ... 
- org.apache.ibatis.exceptions.PersistenceException:  ### Error querying database.  Cause: java.lang.NumberFormatException: For input string: "W%" ### Cause: java.lang.NumberFormatException: For input s
		一个常见的myBatis xml文件中的引号错误: org.apache.ibatis.exceptions.PersistenceException: ### Error querying data ... 
- HTTP Status 500 - org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
		HTTP Status 500 - org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.e ... 
- mybatis <fireach> 拼接sql语句 org.apache.ibatis.exceptions.PersistenceException:  ### Error querying database.  Cause: org.apache.ibatis.builder.BuilderException: Error evaluating expression 'in'. Cause:
		<select id="getUserIn" parameterType="QueryVo" resultMap="userMap"& ... 
- MyBatis-Exception:org.apache.ibatis.exceptions.PersistenceException
		错误信息如下: HTTP Status 500 - org.mybatis.spring.MyBatisSystemException: nested exception is org.apache. ... 
- MyException--org.apache.ibatis.exceptions.PersistenceException:  ### Error building SqlSession. ###
		org.apache.ibatis.exceptions.PersistenceException: ### Error building SqlSession. ### The error may ... 
- org.apache.ibatis.exceptions.PersistenceException:  ### Error querying database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manu
		这个是sql 语句 错误 仔细检查 SQL语句是否写错了 org.apache.ibatis.exceptions.PersistenceException: ### Error queryi ... 
- org.apache.ibatis.exceptions.PersistenceException:
		org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: java.lang.Ill ... 
- org.apache.ibatis.exceptions.PersistenceException:  ### Error querying database.  Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure  The last packet sent succ
		数据库 没有开启 连接失败 org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause ... 
随机推荐
- Windows和linux的文件共享(1)
			今天是我学习linux以来第一次写博客.带着一种激动心情我开始尝试着去完成第一篇博客.从易到难.所以第一次我就主要学习了Windows之间的文件共享. Window之间的文件共享是通过局域网实现的.局 ... 
- Java和C#语法对比
			Java 有静态导入,既可以导入静态方法和字段. .NET没有 Java里package和文件夹对应关系是强制的,要改都改.而C#中namespace和文件夹可以不对应,C# 更喜欢在一个projec ... 
- MIMO下的MES均方误差详细推导过程
- [LeetCode] 423 Reconstruct Original Digits from English
			Given a non-empty string containing an out-of-order English representation of digits 0-9, output the ... 
- MongoDB学习笔记—03 增删改查操作
			MongoDB的CURD操作分别通过函数insert().update().find().remove()进行 MongoDB文档新增与删除 MongoDB中关于文档的新增与删除比较简单.主要通过in ... 
- 数据库表中存在Text类型的属性时,写sql语句时需要注意喽!
			之前,习惯性地写查询语句时,查询条件用“=”判断.今天写程序的时候,查询时突然报了一个错误:数据类型text 和varchar 在equal to 运算符中不兼容.查看了一下数据库发现,其中有一个属性 ... 
- oracle高阶知识点
			------------------------------------------------- varchar2(4000)字符型,最大长度不能超过4000,与char的区别是不用空格补足 num ... 
- player.swf播放flv方式
			<embed src="../images/player.swf" allowFullScreen="true" quality="high&q ... 
- overview
			[1] Don’t panic! All will become clear in time; [2] You don’t have to know every detail of C++ to wr ... 
- Linux 下比较文件内容并相同部分、不同部分
			说明,是通过file2内容与file1做比较,最后列出file1与file2不同的部分! 一.准备两个文件: [root@kinggoo.com test1]# cat file1 a b c d e ... 
