apache/flink · error · java.lang.IllegalArgumentException

Only JSON schemes with simple references (one indirection in

Error message

Only JSON schemes with simple references (one indirection in the same document) are supported yet. But was: {}

What it means

Error "Only JSON schemes with simple references (one indirection in the same document) are supported yet. But was: {}" thrown in apache/flink.

Source

Thrown at flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/JsonRowSchemaConverter.java:352

        // "If the instance value is a string, this property defines that the string SHOULD
        // be interpreted as binary data and decoded using the encoding named by this property."

        switch (node.asText()) {
            case CONTENT_ENCODING_BASE64:
                return Types.PRIMITIVE_ARRAY(Types.BYTE);
            default:
                // we fail hard here:
                // this gives us the chance to support more encodings in the future without problems
                // of backwards compatibility
                throw new IllegalArgumentException(
                        "Invalid encoding '" + node.asText() + "' in node: " + location);
        }
    }

    private static JsonNode resolveReference(String ref, JsonNode origin, JsonNode root) {
        if (!ref.startsWith("#")) {
            throw new IllegalArgumentException(
                    "Only JSON schemes with simple references "
                            + "(one indirection in the same document) are supported yet. But was: "
                            + ref);
        }
        final String path = ref.substring(1);
        final JsonNode foundNode = root.at(path);
        if (foundNode.isMissingNode()) {
            throw new IllegalArgumentException("Could not find reference: " + ref);
        }
        // prevent obvious cyclic references
        if (foundNode == origin) {
            throw new IllegalArgumentException("Cyclic references are not supported:" + ref);
        }
        return foundNode;
    }

    private static TypeInformation<?>[] convertTypes(
            String location, JsonNode arrayNode, JsonNode root) {

View on GitHub (pinned to 2f3c205e92)

Solutions

  1. Address the cause reported by the error message: Only JSON schemes with simple references (one indirection in the same document) are supported yet. But was: the reported value
  2. Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry.

Example fix

Correct the condition described ("Only JSON schemes with simple references (one indirection in the same document) are supported yet. But was: the reported value") and rerun the job or command.

When it happens

Trigger: Triggered at runtime when the operation fails because: Only JSON schemes with simple references (one indirection in the same document) are supported yet. But was: the reported value.

Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Only JSON schemes with simple references (one indirection in the same document) are supported yet. But was: the reported value.


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