Skip to content

Commit

Permalink
hotfix: load driver by name before instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
whhe committed Feb 5, 2024
1 parent d1433b5 commit e12f47f
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ public OceanBaseConnectionProvider(OceanBaseConnectorOptions options) {
}

private String getCompatibleMode() {
try {
Class.forName(options.getDriverClassName());
} catch (ClassNotFoundException e) {
throw new RuntimeException(
"Failed to load driver class: " + options.getDriverClassName(), e);
}
String mode =
OceanBaseJdbcUtils.getCompatibleMode(
() ->
Expand Down

0 comments on commit e12f47f

Please sign in to comment.