public String validate() {
Connection connection = null;
try {
connection = sessionFactoryBean.getDataSource().getConnection();
DatabaseMetadata meta;
logger.info("fetching database metadata");
Configuration config = sessionFactoryBean.getConfiguration();
Dialect dialect = Dialect.getDialect(sessionFactoryBean.getHibernateProperties());
meta = new DatabaseMetadata(connection, dialect, false);
return validateSchema(config, dialect, meta);
} catch (SQLException sqle) {
logger.error("could not get database metadata", sqle);
throw new RuntimeException(sqle);
} finally {