Skip to content
Advertisement

Error parsing SQL Mapper Configuration in mybatis

I am using mybatis framework in a servlet and the mybatis-config.xml file is unable to find the Student_mapper class.I applied all the paths including the package name and excluding it and also used the element in my mybatis-config.xml but it doesn’t work.I am still getting the same error.

JavaScript

Here’s my mybatis-config.xml file

JavaScript

Here’s my Student_mapper interface

JavaScript

Advertisement

Answer

The mapper class needs to be a valid Java class name. Change your mybatis-config.xml to the following:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement