更新时间:2023-09-20 22:34:22
您需要将hibernate-jpa-2.1-api-1.0.0.Final.jar
添加到类路径中.
You need to add hibernate-jpa-2.1-api-1.0.0.Final.jar
to the classpath.
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
<version>1.0.0.Final</version>
</dependency>
Table#indexes()
方法已在版本2.1中添加.因此,您在类路径中使用了@Table
批注的jar(例如2.0版示例)不正确.它可以位于应用程序服务器或Web容器的默认lib
文件夹中.
Table#indexes()
method was added in the version 2.1. So you have an incorrect jar (for an example version 2.0) with the @Table
annotation in the class path. It can be in the default lib
folder of the application server or the web container.
解决方案
persistence-api-1.0.jar
中存在错误的@Table
批注.因此,需要从类路径中删除此jar. hibernate-jpa-2.1-api-1.0.0.Final.jar
具有所有带有persistence-api-1.0.jar
的注释.
An incorrect @Table
annotation resides in the persistence-api-1.0.jar
. So it is need to delete this jar from the class path. hibernate-jpa-2.1-api-1.0.0.Final.jar
has all annotations which has persistence-api-1.0.jar
.
Spark:线程&"main&"中的异常; java.lang.ClassNotFoundException:com.mysql.jdbc.Driver
线程"main"中的异常java.lang.NoSuchMethodError:javax.persistence.Table.indexes()[Ljavax/persistence/Index;
“线程“main"中的异常java.lang.IndexOutOfBoundsException:索引:0,大小:0"与 ArrayList?
线程“main"中的 JavaFX 异常java.lang.NoClassDefFoundError: javafx/application/Application
线程&"main&"中的JavaFX异常;java.lang.NoClassDefFoundError:javafx/application/Application
线程“main”中的JavaFX异常java.lang.NoClassDefFoundError:javafx / application / Application
线程“main"中的JavaFX异常java.lang.NoClassDefFoundError: javafx/application/Application