首页 > 移动平台 > 详细

nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeEx

时间:2018-01-30 13:57:52      阅读:6963      评论:0      收藏:0      [点我收藏+]

1、环境mybaties:

配置映射运行时出现:nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias ‘VARCHAR‘.  Cause: java.lang.ClassNotFoundException: Cannot find class: VARCHAR

2、仔细检查了十几分钟,才发现映射配置错误;

改前:

<result column="FILE_ID" javaType="VARCHAR" property="fileId"/>

改后:
<result column="FILE_ID" jdbcType="VARCHAR" property="fileId"/>


3、牵扯出下面两者的区别
javaType:表示的实体类中字段的类别
jdbcType:表示的数据库表中的字段类别;

nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeEx

原文:https://www.cnblogs.com/daguozb/p/8384015.html

(3)
(7)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!