Java 从4.3迁移到5.1 hibernate后,SchemaExport将引发异常

Java 从4.3迁移到5.1 hibernate后,SchemaExport将引发异常,java,hibernate,migration,schemaexport,Java,Hibernate,Migration,Schemaexport,我将hibernate从4.3迁移到5.1,模式导出出现异常。Hibernate迁移指南提到了这一点,但没有提供解决方案 我试图使用元数据源,但它对我没有帮助。下面是导致我的HibernateUtils中出现此问题的代码行 public static List createDBSchema() { Configuration cfg = getConfiguration(); SchemaExport dbSchema = new SchemaExport(cfg);

我将hibernate从4.3迁移到5.1,模式导出出现异常。Hibernate迁移指南提到了这一点,但没有提供解决方案

我试图使用元数据源,但它对我没有帮助。下面是导致我的HibernateUtils中出现此问题的代码行

   public static List createDBSchema() {

    Configuration cfg = getConfiguration();
    SchemaExport dbSchema = new SchemaExport(cfg);
    dbSchema.create(false, true);

    return dbSchema.getExceptions();
}
以下是在cmd中安装mvn后的错误消息

HibernateUtils.java:[587,41] constructor SchemaExport in class org.hibernate.tool.hbm2ddl.SchemaExport cannot be applied to given types;
[ERROR]   required: no arguments
[ERROR]   found: org.hibernate.cfg.Configuration
[ERROR]   reason: actual and formal argument lists differ in length
[ERROR] /C:/Development/Neon-Workspace/invitely_app/src/main/java/wadetech/DB/base/HibernateUtils.java:[588,33] incompatible types: boolean cannot be converted to java.util.EnumSet<org.hibernate.tool.schema.TargetType>
HibernateUtils.java:[587,41]类org.hibernate.tool.hbm2ddl.SchemaExport中的构造函数SchemaExport不能应用于给定类型;
[错误]必需:无参数
[错误]找到:org.hibernate.cfg.Configuration
[错误]原因:实际参数列表和正式参数列表长度不同
[错误]/C:/Development/Neon Workspace/invitely_app/src/main/java/wadetech/DB/base/HibernateUtils.java:[588,33]不兼容类型:布尔值无法转换为java.util.EnumSet

如何联系他人以获得帮助。这对我来说非常紧迫。像这样的Thaxseem在这里得到了回答:其中一个有5.2、5.0和4的答案,不幸的是没有5.1的答案。感谢您的回复。API应该在5.2 5.1和5.0之间足够接近。如何联系人们以获得帮助。这对我来说非常紧迫。像这样的Thaxseem在这里得到了回答:其中一个有5.2、5.0和4的答案,不幸的是没有5.1的答案。感谢您的回复。API应该在5.25.1和5.0之间足够接近