try {
// Load the data map and run the db generator.
DataMap dataMap = loadDataMap();
DbGenerator generator = new DbGenerator(adapter, dataMap);
generator.setShouldCreateFKConstraints(createFK);
generator.setShouldCreatePKSupport(createPK);
generator.setShouldCreateTables(createTables);
generator.setShouldDropPKSupport(dropPK);
generator.setShouldDropTables(dropTables);
// load driver taking custom CLASSPATH into account...
DriverDataSource dataSource = new DriverDataSource((Driver) Class.forName(
driver).newInstance(), url, userName, password);
generator.runGenerator(dataSource);
}
catch (Exception ex) {
Throwable th = Util.unwindException(ex);
String message = "Error generating database";