apache/seatunnel · error · org.apache.seatunnel.api.table.catalog.exception.CatalogException
Check ${databaseName} exist error
Error message
Check ${databaseName} exist error What it means
MaxComputeCatalog.databaseExists wraps any OdpsException from the MaxCompute SDK projects().exists() call into a CatalogException with this message. It means the existence check against the MaxCompute project (database) failed at the network/API level, not that the project does not exist.
Source
Thrown at seatunnel-connectors-v2/connector-maxcompute/src/main/java/org/apache/seatunnel/connectors/seatunnel/maxcompute/catalog/MaxComputeCatalog.java:98
@Override
public String name() {
return catalogName;
}
@Override
public String getDefaultDatabase() throws CatalogException {
return readonlyConfig.get(MaxcomputeBaseOptions.PROJECT);
}
@Override
public boolean databaseExists(String databaseName) throws CatalogException {
try {
Odps odps = getOdps(readonlyConfig.get(MaxcomputeBaseOptions.PROJECT));
Projects projects = odps.projects();
return projects.exists(databaseName);
} catch (OdpsException e) {
throw new CatalogException("Check " + databaseName + " exist error", e);
}
}
@Override
public List<String> listDatabases() throws CatalogException {
try {
// todo: how to get all projects
String project = readonlyConfig.get(MaxcomputeBaseOptions.PROJECT);
if (databaseExists(project)) {
return Lists.newArrayList(project);
}
return Collections.emptyList();
} catch (Exception e) {
throw new CatalogException("listDatabases exist error", e);
}
}
@OverrideView on GitHub (pinned to cf67b549a7)
Solutions
- Check the cause (OdpsException) for the real error: auth, network, or permission
- Verify endpoint, project, access-key-id and access-key-secret in the sink/source options
- Confirm the account has permission to view the project in the MaxCompute console
- Test connectivity from the runtime host (curl the MaxCompute endpoint)
Example fix
// before
// options missing endpoint -> SDK uses default and fails
MaxcomputeOptions options = MaxcomputeOptions.builder()
.withProject("my_proj")
.withAccessId("ak")
.withAccessKey("sk")
.build();
// after
MaxcomputeOptions options = MaxcomputeOptions.builder()
.withProject("my_proj")
.withEndpoint("http://service.cn-hangzhou.maxcompute.aliyun.com/api")
.withAccessId("ak")
.withAccessKey("sk")
.build(); Defensive patterns
Strategy: try-catch
Validate before calling
// before calling catalog ops, verify config completeness
if (readonlyConfig.get(MaxcomputeBaseOptions.PROJECT) == null) {
throw new IllegalArgumentException("MaxCompute 'project' option is required");
} Try / catch
try {
catalog.listDatabases();
} catch (CatalogException e) {
Throwable cause = e.getCause();
if (cause instanceof OdpsException && String.valueOf(cause.getMessage()).contains("SignatureDoesNotMatch")) {
throw new IllegalStateException("Invalid MaxCompute credentials", e);
}
throw e; // network/permission errors are not safely retryable here
} Prevention
- Verify endpoint/project/access-key settings before submitting the job
- Test credentials with odpscmd or the console first
- Ensure worker nodes can reach the MaxCompute endpoint (firewall/VPC)
- Grant the account List/View permissions on the project
When it happens
Trigger: listDatabases calls databaseExists(project); the SDK call odps.projects().exists(databaseName) throws OdpsException due to connectivity, auth, or missing project permissions.
Common situations: Wrong endpoint/tunnel URL or unreachable MaxCompute region; invalid accessKey/accessKeySecret; project name typo; account lacks List permission on the project; network/firewall blocking the endpoint.
Understand the failure class
Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.
Related errors
- listDatabases exist error
- tableExists${tablePath} error
- create partition error
- execute sql error
- Failed close kudu client
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/19dcd48359b17056.
Report an issue: GitHub.