0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Java】Mapperに重複タグ情報があるとMyBatisのビルドエラーになって落ちる。

Posted at

こんなエラーに遭遇しました。

### Error building SqlSession.

### The error may exist in mapper/AdminUserMapper.xml

### The error occurred while processing mapper_resultMap[BaseResultMap]

### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. 

Cause: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. 

The XML location is 'mapper/AdminUserMapper.xml'. 

Cause: java.lang.IllegalArgumentException: Result Maps collection already contains key mapper.AdminUserMapper.BaseResultMap

MyBatisの読み込みを1回しかしていないので2回呼び出されていました。

原因は、Mapperの更新によって重複タグが生成されていたためでした。

下記の重複タグを1つ1つ刑していけば解決できました。
MyBatis_Default_Where_Clause

Base_Column_List

selectByPrimaryKey

deleteByPrimaryKey

insert

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?