在映射文件中,通过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的更多相关文章

  1. mybatis bug之org.apache.ibatis.exceptions.PersistenceException:

    详细报错信息: org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: java. ...

  2. 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 ...

  3. 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 ...

  4. 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"& ...

  5. MyBatis-Exception:org.apache.ibatis.exceptions.PersistenceException

    错误信息如下: HTTP Status 500 - org.mybatis.spring.MyBatisSystemException: nested exception is org.apache. ...

  6. MyException--org.apache.ibatis.exceptions.PersistenceException: ### Error building SqlSession. ###

    org.apache.ibatis.exceptions.PersistenceException:  ### Error building SqlSession. ### The error may ...

  7. 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 ...

  8. org.apache.ibatis.exceptions.PersistenceException:

    org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: java.lang.Ill ...

  9. 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 ...

随机推荐

  1. gcc 常用命令行及解释

    gcc - GNU project C and C++ compiler   gcc [option] file...            preprocessing         compila ...

  2. HDU2471_History of Languages

    有意思的题目,给出两个自动机,判断这个两个自动机是否是等价的? 两个自动机是等价的,那么他们可接受的字符串集合一定是完全一样的. 于是我们可以从(0,0)开始bfs,每次看看在两个自动机上走到的两个点 ...

  3. OD使用教程4

    去除nag窗口: 方法一将je改成jmp跳过messageboxA 方法二全部填充成Nop,选中右键二进制Nop填充 第三种方法push的值改成1使句柄不存在 获得模块句柄: 第四种修改入口地址 点击 ...

  4. Android PowerImageView实现,可以播放动画的强大ImageView

    转载请注明出处:http://blog.csdn.net/guolin_blog/article/details/11100315 我个人是比较喜欢逛贴吧的,贴吧里总是会有很多搞笑的动态图片,经常看一 ...

  5. gitlab安装过程总结

    gitlab总算搭建好了,今天下午完成了第一个工程的导入. 梳理下搭建的过程: 1.下载bitnami的一键安装包,并安装 注意设置权限为777,以免出现某文件写入错误的问题 2.配置邮件服务 分别修 ...

  6. S2SH简介

    struts2简介 Struts2是由WebWork基础上发展起来的,与struts1比较,选用struts2的理由是:①Struts1要求Action类继承一个抽象基类,而Struts 2 Acti ...

  7. 安卓奇葩问题之.so库加载不了

    真是哔了狗了. 今天突然遇到一个问题:之前用第三方的密码控件,给了一个.so库文件.然后我就放在了/jniLibs/armeabi目录下. 运行,一切都很OK. 然后重点来了.N天之后的今天,突然打包 ...

  8. Good-Bye

    嘛……以一种奇怪的姿势滚粗了…… 如果这个Blog能给未来的OIer们一些帮助的话,它也不枉存在了…… 我的OI之路也能以另一种形式延续下去吧…… 也许能搞ACM的话会再开?…… 不管怎么说,各位再见 ...

  9. 4.总结近5周以来的github上的工作情况,以图表方式分析你小组的工作情况、存在的问题及解决的方案。(尤心心)

    4.总结近5周以来的github上的工作情况,以图表方式分析你小组的工作情况.存在的问题及解决的方案. (1)利用github本身的graphs可以清晰的看出小组成员在github上面的交互,可以直接 ...

  10. PerconaXtraBackup 压缩备份集

    压缩备份集 stream模式支持且只支持:tar 和 xbstream 两种格式,后者是xtrabackup提供的专有格式,解包时需要同名的专用命令处理 innobackupex --defaults ...