How to use SchemaExportTool with JPA and Hibernate 4.3
问题 At Hibernate 4.3 Ejb3Configuration class was removed. This class was commonly used for creating hibernate configuration file from a persistence unit (persistence.xml file) to SchemaExport tool. As a simple alternative to export schema to .sql file I'm using the following code: public static void export(String persistenceUnit, String exportFileName) { Map<String, String> hash = new HashMap<String, String>(); hash.put("hibernate.hbm2ddl.auto", "create-drop"); EntityManagerFactory factory =