---
title: "mybatis错误"
author: "Janne"
date: "2020-08-17T16:51:41Z"
tags: ["MyBatis"]
categories: ["编程语言"]
slug: "mybatis"
draft: false
lastmod: "2020-08-18T20:20:11Z"
id: 2516323
url: "https://janne.iteye.com/blog/2516323"
---

问题一：nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: java.sql.SQLException: 无效的列类型: 1111 错误原因mybatis插入对象时，若部分属性为空值 解决办法：SQL每个值中加入jdbcType即可 如： insert into USER(USER\_NAME,USER\_DESC) values (#{userName, jdbcType=VARCHAR},#{userDesc, jdbcType=VARCHAR}) 问题二： java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符 原因是：你的sql多了一个";" 去掉就可以了