if (LOG.isDebugEnabled()) {
LOG.debugf("Guessing database version as '%s'. If this is incorrect, please specify both the correct " +
"major and minor version of your database using the 'databaseMajorVersion' and " +
return new DbMetaData(databaseType, majorVersion, minorVersion, disableUpsert, disableIndexing, disableSegmented);
} catch (SQLException e) {
if (LOG.isDebugEnabled())
LOG.debug("Unable to retrieve DB Major and Minor versions from JDBC metadata.", e);
} finally {
return new DbMetaData(guessDialect(dbProduct), majorVersion, minorVersion, disableUpsert, disableIndexing, disableSegmented);
} catch (Exception e) {
if (LOG.isDebugEnabled())
LOG.debug("Unable to guess dialect from JDBC metadata.", e);
} finally {
if (LOG.isDebugEnabled())
LOG.debug("Unable to detect database dialect using connection metadata. Attempting to guess on driver name.");
try {
return new DbMetaData(guessDialect(dbProduct), majorVersion, minorVersion, disableUpsert, disableIndexing, disableSegmented);
} catch (Exception e) {
if (LOG.isDebugEnabled())
LOG.debug("Unable to guess database dialect from JDBC driver name.", e);
} finally {
if (LOG.isDebugEnabled())
LOG.debugf("Guessing database dialect as '%s'. If this is incorrect, please specify the correct dialect using the 'dialect' attribute in your configuration. Supported database dialect strings are %s", databaseType, Arrays.toString(DatabaseType.values()));
return new DbMetaData(databaseType, majorVersion, minorVersion, disableUpsert, disableIndexing, disableSegmented);