Exception in thread “main” java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index;
at org.hibernate.cfg.annotations.EntityBinder.processComplementaryTableDefinitions(EntityBinder.java:914)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:716)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:3598)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3552)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1358)
at org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:939)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:188)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:156)
at com.zhj.test.TestT.main(TestT.java:20)
本人用的是Hibernate 4.3
意思是javax.persistence包下的Table类没有indexes方法,要么是你jar没导入,要么你jar包冲突