apache/seatunnel · error · org.apache.seatunnel.api.metadata.MetadataProviderException
Failed to resolve datasource config for connector
Error message
Failed to resolve datasource config for connector: %s, metadata_datasource_id: %s, provider: %s
What it means
MetadataProviderManager.resolveConnectorConfig caught a failure while asking the metadata provider (e.g. Gravitino) for the datasource connection config of a connector: either provider.datasourceMap(...) threw, or the returned map could not be merged. The message records the connector identifier, the metadata_datasource_id from the job config, and the provider kind, identifying exactly which datasource lookup failed.
Solutions
- Verify the metadata_datasource_id exists and is accessible in the metadata service (e.g. Gravitino metalake)
- Check that the provider kind configured for the datasource is loaded and its connection settings (uri, metalake) are valid
- Inspect the logged cause chain for the underlying provider exception and fix that (network, auth, missing metalake)
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/metadata/MetadataProviderManager.java:218 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/ff8a031d3220119e.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/metadata/MetadataProviderManager.java:218
try {
// Fetch connection config from metadata service via provider
Map<String, Object> datasourceConfig =
provider.datasourceMap(connectorIdentifier, datasourceId);
if (datasourceConfig == null || datasourceConfig.isEmpty()) {
log.warn(
"Received empty or null config from MetadataProvider for metadata_datasource_id: {}",
datasourceId);
return connectorConfig;
}
// Merge the fetched config into the original config
return mergeConfig(connectorConfig, datasourceConfig, datasourceId);
} catch (MetadataProviderException e) {
throw e;
} catch (Exception e) {
throw new MetadataProviderException(
String.format(
"Failed to resolve datasource config for connector: %s, metadata_datasource_id: %s, provider: %s",
connectorIdentifier, datasourceId, providerKind),
e);
}
}
/**
* Gets the metadata_datasource_id from a connector config.
*
* <p>This method first checks at the root level, then looks inside the nested connector config.
*
* @param config the connector configuration
* @return Optional containing the metadata_datasource_id if present, empty otherwise
*/
private static Optional<String> getDatasourceId(Config config) {
try {
// First check at root level (for configs like { Jdbc: {...}, metadata_datasource_id:View on GitHub (pinned to cf67b549a7)