Correct the classpath of your application so that it contains a single, compatible version of javax.

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/AYZXX/article/details/90230203
Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.hibernate.cfg.annotations.EntityBinder.processComplementaryTableDefinitions(EntityBinder.java:1236)

The following method did not exist:

    javax.persistence.Table.indexes()[Ljavax/persistence/Index;

The method's class, javax.persistence.Table, is available from the following locations:

    jar:file:/E:/springboot/sprintboot01/codes/codes/14/AYZXX-A/lib/javax.persistence.jar!/javax/persistence/Table.class
    jar:file:/C:/Users/zhongxiaoxia/.m2/repository/javax/persistence/javax.persistence-api/2.2/javax.persistence-api-2.2.jar!/javax/persistence/Table.class

It was loaded from the following location:

    file:/E:/springboot/sprintboot01/codes/codes/14/AYZXX-A/lib/javax.persistence.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of javax.persistence.Table

 1,最近刚学IDEA,对这个工具不是很熟,项目报错,上网查,有的说是版本冲突,也有的说是jar重复,经检验,jar包重复。

需要删除:

 file:/E:/springboot/sprintboot01/codes/codes/14/AYZXX-A/lib/javax.persistence.jar

而不要删除:

  jar:file:/E:/springboot/sprintboot01/codes/codes/14/AYZXX-A/lib/javax.persistence.jar!/javax/persistence/Table.class
    jar:file:/C:/Users/zhongxiaoxia/.m2/repository/javax/persistence/javax.persistence-api/2.2/javax.persistence-api-2.2.jar!/j

这是实验所得, 原因未知。

 

展开阅读全文

没有更多推荐了,返回首页