SpringBoot 2.1.0 throws ClassNotFoundException when trying to integrate database access

前端 未结 4 1488
春和景丽
春和景丽 2021-01-27 00:38

I have a simple SpringBoot 2.1.0 application and try to add the database-connectivity with JPA. Everything is set up with the \"spring-boot-start

相关标签:
4条回答
  • 2021-01-27 01:14

    It worked for me when I removed the folder for hibernate from the path

    C:\Users\<Your user>\.m2\repository\org
    

    Also deleted the folder net\bytebuddy

    In eclipse, Right Click on the project and then Maven -> Update Project

    0 讨论(0)
  • 2021-01-27 01:23

    add dependency in pom.xml

    <dependency>
        <groupId>net.bytebuddy</groupId>
        <artifactId>byte-buddy-dep</artifactId>
        <version>1.9.12</version>
    </dependency>
    
    0 讨论(0)
  • 2021-01-27 01:28

    Byte Buddy is used by Hibernate. By forcing Byte Buddy into test scope, the library is now missing at runtime.

    0 讨论(0)
  • 2021-01-27 01:35

    For me helped adding the following to the module-info.java file:

    requires net.bytebuddy;
    

    This is only applicable for applications with Java 9 or higher.

    0 讨论(0)
提交回复
热议问题