apache/seatunnel · error · HugeGraphConnectorException

INVALID_GRAPH_SCHEMA

INVALID_GRAPH_SCHEMA

Error message

No %s labels found in HugeGraph graph '%s'; nothing to read.

What it means

When reading all labels of a type (vertex or edge), the factory queries HugeGraph for the label list via the client. If the server returns an empty list there is nothing to read, so the factory fails fast with INVALID_GRAPH_SCHEMA including the label type and graph name, instead of emitting a job with zero splits.

Source

Thrown at seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/source/HugeGraphSourceFactory.java:176

                options.getOptional(HugeGraphSourceOptions.FILTER)
                        .map(filter -> !filter.isEmpty())
                        .orElse(false);
        if (hasFilter) {
            throw new HugeGraphConnectorException(
                    HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT,
                    "'filter' cannot be combined with reading all labels (option 'label' omitted): "
                            + "a property-equality filter assumes the property exists on every "
                            + "label. Set 'label' to use 'filter'.");
        }
        HugeGraphClient client = new HugeGraphClient(HugeGraphConnectionConfig.of(options));
        List<String> labels;
        try {
            labels =
                    labelType == MappingConfig.LabelType.VERTEX
                            ? client.listVertexLabels()
                            : client.listEdgeLabels();
            if (labels.isEmpty()) {
                throw new HugeGraphConnectorException(
                        HugeGraphConnectorErrorCode.INVALID_GRAPH_SCHEMA,
                        String.format(
                                "No %s labels found in HugeGraph graph '%s'; nothing to read.",
                                labelType == MappingConfig.LabelType.VERTEX ? "vertex" : "edge",
                                options.get(HugeGraphOptions.GRAPH_NAME)));
            }
            for (String label : labels) {
                SeaTunnelRowType propertyRowType =
                        discoverPropertyRowType(client, label, labelType);
                CatalogTable propertyTable =
                        CatalogTableUtil.getCatalogTable(label, propertyRowType);
                CatalogTable producedTable =
                        CatalogTableUtil.newCatalogTable(
                                propertyTable, prependReservedFields(propertyRowType, labelType));
                catalogTables.add(producedTable);
                labelContexts.put(
                        label,
                        new LabelTableContext(

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Verify HugeGraphOptions.GRAPH_NAME matches the intended, populated graph.
  2. Check the HugeGraph server (e.g., via its REST API) that vertex/edge labels actually exist in that graph.
  3. Swap the label type configuration (vertex vs edge) if you queried the wrong kind.
  4. Create the schema (labels) on the target graph before running the job.

Example fix

// before
source {
  HugeGraph {
    graph = "emptygraph"
    label_type = vertex
  }
}
// after
source {
  HugeGraph {
    graph = "hugegraph"   # graph that actually has vertex labels
    label_type = vertex
  }
}
Defensive patterns

Strategy: validation

Validate before calling

// curl -s "http://HOST:PORT/graphs/<graph>/schema/vertexlabels" | jq 'length' # > 0

Try / catch

try {
  factory.createSource(config);
} catch (HugeGraphConnectorException e) {
  if (e.getErrorCode() == INVALID_GRAPH_SCHEMA) { /* check graph name / schema */ }
}

Prevention

When it happens

Trigger: createSource() -> buildReadAllTables() with 'label' omitted; client.listVertexLabels() or listEdgeLabels() returns an empty collection for the configured graph.

Common situations: Connecting to the wrong or a freshly created/empty HugeGraph graph; typo in graph name so a different empty graph is queried; wrong label type (reading edges when only vertices exist); schema not yet created on the target graph.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/3f240560a51a6cba. Report an issue: GitHub.