apache/flink · error · UnsupportedOperationException

A side output with a matching id was already requested with

Error message

A side output with a matching id was already requested with a different type. This is not allowed, side output ids need to be unique.

What it means

Error "A side output with a matching id was already requested with a different type. This is not allowed, side output ids need to be unique." thrown in apache/flink.

Source

Thrown at flink-datastream/src/main/java/org/apache/flink/datastream/impl/stream/AbstractDataStream.java:74

    }

    public TypeInformation<T> getType() {
        return transformation.getOutputType();
    }

    /** This is only used for internal implementation. It must not leak to user face api. */
    public Transformation<T> getTransformation() {
        return transformation;
    }

    public ExecutionEnvironmentImpl getEnvironment() {
        return environment;
    }

    public <X> Transformation<X> getSideOutputTransform(OutputTag<X> outputTag) {
        TypeInformation<?> type = requestedSideOutputs.get(outputTag);
        if (type != null && !type.equals(outputTag.getTypeInfo())) {
            throw new UnsupportedOperationException(
                    "A side output with a matching id was "
                            + "already requested with a different type. This is not allowed, side output "
                            + "ids need to be unique.");
        }
        requestedSideOutputs.put(outputTag, outputTag.getTypeInfo());

        return new SideOutputTransformation<>(getTransformation(), outputTag);
    }
}

View on GitHub (pinned to 2f3c205e92)

Solutions

  1. Address the cause reported by the error message: A side output with a matching id was already requested with a different type. This is not allowed, side output ids need to be unique.
  2. Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry.

Example fix

Correct the condition described ("A side output with a matching id was already requested with a different type. This is not allowed, side output ids need to be unique.") and rerun the job or command.

When it happens

Trigger: Triggered at runtime when the operation fails because: A side output with a matching id was already requested with a different type. This is not allowed, side output ids need to be unique.

Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: A side output with a matching id was already requested with a different type. This is not allowed, side output ids need to be unique.


AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14). Data as JSON: /api/errors/5790208ec5902f33. Report an issue: GitHub.