diff --git a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcConnector.java b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcConnector.java index 13ac4c727a36..22181e5ad5b7 100644 --- a/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcConnector.java +++ b/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcConnector.java @@ -15,6 +15,7 @@ import com.google.common.collect.ImmutableSet; import io.airlift.bootstrap.LifeCycleManager; +import io.trino.plugin.base.classloader.ClassLoaderSafeConnectorMetadata; import io.trino.plugin.base.session.SessionPropertiesProvider; import io.trino.spi.connector.Connector; import io.trino.spi.connector.ConnectorAccessControl; @@ -100,7 +101,7 @@ public ConnectorMetadata getMetadata(ConnectorTransactionHandle transaction) { JdbcMetadata metadata = transactions.get(transaction); checkArgument(metadata != null, "no such transaction: %s", transaction); - return metadata; + return new ClassLoaderSafeConnectorMetadata(metadata, getClass().getClassLoader()); } @Override