Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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