Springboot: org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister

和自甴很熟 提交于 2019-11-30 06:03:52

The problem is with Jdk 11 and javassist.

Add this in your pom.xml:

<dependency>
    <groupId>org.javassist</groupId>
    <artifactId>javassist</artifactId>
    <version>3.23.1-GA</version>
</dependency>

Info taken from: here

One needs to be careful when migration from Java 8 to Java 11, many things don't work out of the box.

You are defined the java.version = 1.8

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
</properties>

This exception may cause if you use OpenJDK 11 (default on Travis-CI).

Try to change JDK version to 8 in .travis.yml like this:

jdk:
  - openjdk8
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!