码迷,mamicode.com
首页 > 其他好文 > 详细

mybatis报错invalid types () or values ()解决方法

时间:2018-01-22 11:16:40      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:构造函数   org   对象   原因   err   lang   log   mode   条件查询   

报错信息:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: Error instantiating class com.huawei.PIM.DA.common.tools.DB.bean.table.T_contactList with invalid types () or values (). Cause: java.lang.NoSuchMethodException: com.huawei.PIM.DA.common.tools.DB.bean.table.T_contactList.<init>()

原因:
1) model中的get/set方法与成员变量不一。
2) 构造函数被重载过,但是没有空的构造函数。
3) 最好不要使用简单类型,如int, long等,改用对象模式Integer, Long等。在写条件查询时会用到判断<if xxx != null > … </if>的

mybatis报错invalid types () or values ()解决方法

标签:构造函数   org   对象   原因   err   lang   log   mode   条件查询   

原文地址:https://www.cnblogs.com/thinkingandworkinghard/p/8327639.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!