Skip to content

Commit 1945d04

Browse files
committed
Ignore AbstractMethodError throw by Connection.getSchema() on Sybase
1 parent 1d476f5 commit 1945d04

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

hibernate-core/src/main/java/org/hibernate/engine/jdbc/env/internal/DefaultSchemaNameResolver.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ private DefaultSchemaNameResolver() {
2424

2525
@Override
2626
public String resolveSchemaName(Connection connection, Dialect dialect) throws SQLException {
27-
return connection.getSchema();
27+
try {
28+
return connection.getSchema();
29+
}
30+
catch (AbstractMethodError ignore) {
31+
// jConnect and jTDS report that they "support" schemas, but they don't really
32+
return null;
33+
}
2834
}
2935

3036
}

0 commit comments

Comments
 (0)