I migrate my hibernate from 4.3 to 5.1 and I have an exception with Schema Export. Hibernate migration guide mention about this but did not provide the solution.
I tried to use the metadata source and it dint help me.Below are the line which cause this issue that is in my HibernateUtils.
public static List createDBSchema() {
Configuration cfg = getConfiguration();
SchemaExport dbSchema = new SchemaExport(cfg);
dbSchema.create(false, true);
return dbSchema.getExceptions();
}
Following is the error message after an mvn install in cmd.
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>