Unexpected error while mybatis generator working. unsupported version of major.minor 51.0

I get this error when working with mybatis generator configuration. So when I click on generatorConfig.xml and then click on โ€œCreate Mybatis Artifactsโ€. I get above errors

I am using java 1.7 and I installed that the installed java version is jdk1.7.0 and the jdk complie time is 1.7.

Unexpected error while running MyBatis Generator. com/mycom/myproject/db/mybatis/model/BaseModel : Unsupported major.minor version 51.0 

Tables I use as follows

  <table tableName="feed_entries" domainObjectName="Categories" modelType="conditional"> <property name="useActualColumnNames" value="false"/> <property name="rootClass" value="com.mycom.myproject.db.mybatis.model.BaseModel"/> <generatedKey column="id" sqlStatement="MySql" identity="true"/> </table> 

Please let me know if anything else is required.

0
source share
1 answer

The error is related to compiling with J2SE 7 (51), but you are using an application with a lower version. I would say that this has nothing to do with myBatis.

Double check that you are using your code with J2SE 7. Look at this question . If you use it even though Eclipse, make sure that Eclipse also uses J2SE 7.

+1
source

Source: https://habr.com/ru/post/923624/


All Articles