diff --git a/src/main/net/sf/jailer/modelbuilder/JDBCMetaDataBasedModelElementFinder.java b/src/main/net/sf/jailer/modelbuilder/JDBCMetaDataBasedModelElementFinder.java index 910147756..60049fa28 100755 --- a/src/main/net/sf/jailer/modelbuilder/JDBCMetaDataBasedModelElementFinder.java +++ b/src/main/net/sf/jailer/modelbuilder/JDBCMetaDataBasedModelElementFinder.java @@ -402,7 +402,17 @@ public static ResultSet getColumns(Session session, DatabaseMetaData metaData, S try { return metaData.getColumns(null, schemaPattern, tableNamePattern, columnNamePattern); } catch (Exception e) { - throw new RuntimeException("Error in getColumns(): schemaPattern=" + schemaPattern + ", tableNamePattern=" + tableNamePattern + ", columnNamePattern=" + columnNamePattern, e); + String catalogs = ""; + try { + ResultSet r = metaData.getCatalogs(); + while (r.next()) { + catalogs += r.getString(1) + " "; + } + r.close(); + } catch (Exception e2) { + catalogs += "?"; + } + throw new RuntimeException("Error in getColumns(): catalogs= " + catalogs + ", schemaPattern=" + schemaPattern + ", tableNamePattern=" + tableNamePattern + ", columnNamePattern=" + columnNamePattern, e); } }