donhui / sonar-mybatis

MyBatis Plugin for SonarQube: Rules to check SQL statements in MyBatis Mapper XML files
Other
74 stars 21 forks source link

java.lang.ClassNotFoundException: Cannot find class: JsonHandler #16

Closed radboud-asselman closed 5 years ago

radboud-asselman commented 5 years ago

Hi,

@donhui helped me with this issue: https://github.com/donhui/sonar-mybatis/issues/14, but scanning a new project gives us a new error.

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.1.1688:sonar (default-cli) on project caress: Error parsing Mapper XML. The XML location is 'file [D:\jenkins_home\jobs\xxx\workspace\xxx\xxx.logic\src\nl\xxx\xxx\logic\event\persistence\mapper\EventMapper.xml-reduced.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'JsonHandler'. Cause: java.lang.ClassNotFoundException: Cannot find class: JsonHandler -> [Help 1]

Is this also a bug?

donhui commented 5 years ago

@radboud-asselman Thanks for your feed, can you provide the related MyBatis Mapper file?

radboud-asselman commented 5 years ago

Hi,

I included the mapper file. Also the temporary generated file by the plugin.

EventMapper.zip

donhui commented 5 years ago

@radboud-asselman I want to know the content of the Mybatis Mapper file, it will help me troubleshooting. Can you provide it? Thanks~

donhui commented 5 years ago

I have released the version 1.0.5, the issue shoule be resloved.