apache/flink · error · java.lang.IllegalArgumentException

Invalid type for 'items' property in node

Error message

Invalid type for 'items' property in node: {}

What it means

Fallback guard in convertArray: the 'items' node is neither an object (list case) nor an array (tuple case), e.g. a string or number. The converter has no interpretation for such an 'items' value and rejects the schema, with the location identifying the array.

Solutions

  1. Address the cause reported by the error message: Invalid type for 'items' property in node: 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 ("Invalid type for 'items' property in node: the reported value") and rerun the job or command.
Defensive patterns

Strategy: validation

When it happens

Trigger: Triggered at runtime when the operation fails because: Invalid type for 'items' property in node: the reported value.

Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Invalid type for 'items' property in node: the reported value.


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

Appendix: source

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

            final TypeInformation<?> elementType = convertType(location + '/' + ITEMS, items, root);
            // result type might either be ObjectArrayTypeInfo or BasicArrayTypeInfo for Strings
            return Types.OBJECT_ARRAY(elementType);
        }
        // tuple (translated to row)
        else if (items.isArray()) {
            final TypeInformation<?>[] types = convertTypes(location + '/' + ITEMS, items, root);

            // validate that array does not contain additional items
            if (node.has(ADDITIONAL_ITEMS)
                    && node.get(ADDITIONAL_ITEMS).isBoolean()
                    && node.get(ADDITIONAL_ITEMS).asBoolean()) {
                throw new IllegalArgumentException(
                        "An array tuple must not allow additional items in node: " + location);
            }

            return Types.ROW(types);
        }
        throw new IllegalArgumentException(
                "Invalid type for '" + ITEMS + "' property in node: " + location);
    }

    private static TypeInformation<?> convertStringFormat(String location, JsonNode node) {
        if (!node.isTextual()) {
            throw new IllegalArgumentException(
                    "Invalid '" + FORMAT + "' property in node: " + location);
        }

        switch (node.asText()) {
            case FORMAT_DATE:
                return Types.SQL_DATE;
            case FORMAT_TIME:
                return Types.SQL_TIME;
            case FORMAT_DATE_TIME:
                return Types.SQL_TIMESTAMP;
            default:
                return Types.STRING; // unlikely that we will support other formats in the future

View on GitHub (pinned to 2f3c205e92)