alibaba/DataX · error · IllegalArgumentException

property value length over limit(${maxPropValueLength})

Error message

property value length over limit(${maxPropValueLength})

What it means

Thrown by GdbElement.addProperty when a String property value exceeds the configured maximum length from MapperConfig. Note a bug in this code: the check compares propValue.length() against maxPropKeyLength (not maxPropValueLength), while the message reports maxPropValueLength — so the reported limit may not be the limit actually enforced. It is an IllegalArgumentException raised during record assembly before any network call.

Source

Thrown at gdbwriter/src/main/java/com/alibaba/datax/plugin/writer/gdbwriter/model/GdbElement.java:61

    }

    public List<GdbProperty> getProperties() {
        return this.properties;
    }

    public void addProperty(final String propKey, final Object propValue, final PropertyType card) {
        if (propKey == null || propValue == null) {
            return;
        }

        final int maxPropKeyLength = MapperConfig.getInstance().getMaxPropKeyLength();
        if (propKey.length() > maxPropKeyLength) {
            throw new IllegalArgumentException("property key length over limit(" + maxPropKeyLength + ")");
        }
        if (propValue instanceof String) {
            final int maxPropValueLength = MapperConfig.getInstance().getMaxPropValueLength();
            if (((String)propValue).length() > maxPropKeyLength) {
                throw new IllegalArgumentException("property value length over limit(" + maxPropValueLength + ")");
            }
        }

        this.properties.add(new GdbProperty(propKey, propValue, card));
    }

    public void addProperty(final String propKey, final Object propValue) {
        addProperty(propKey, propValue, PropertyType.single);
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer(this.id + "[" + this.label + "]{");
        this.properties.forEach(n -> {
            sb.append(n.cardinality.name());
            sb.append("[");
            sb.append(n.key);
            sb.append(" - ");

View on GitHub (pinned to 80ec23d5c5)

Solutions

  1. Shorten or truncate the offending property value at source (transform step or SQL substring) so it fits the limit.
  2. If the data legitimately needs longer values, raise the value-length limit in the gdbwriter job configuration (MapperConfig maxPropValueLength) within server limits.
  3. Patch the comparison bug: change 'if (((String)propValue).length() > maxPropKeyLength)' to use maxPropValueLength so the enforced limit matches the message.

Example fix

// before
if (((String)propValue).length() > maxPropKeyLength) {
    throw new IllegalArgumentException("property value length over limit(" + maxPropValueLength + ")");
}
// after
if (((String)propValue).length() > maxPropValueLength) {
    throw new IllegalArgumentException("property value length over limit(" + maxPropValueLength + ")");
}
Defensive patterns

Strategy: validation

Validate before calling

int maxLen = MapperConfig.getInstance().getMaxPropValueLength();
Object v = record.getColumn(i).asObject();
if (v instanceof String && ((String) v).length() > maxLen) {
    // truncate or reject before addProperty
    v = ((String) v).substring(0, maxLen);
}

Try / catch

try {
    element.addProperty(key, value);
} catch (IllegalArgumentException e) {
    // log offending key/value length and fail the record, not the whole task
    throw DataXException.asDataXException(GdbWriterErrorCode.ILLEGAL_VALUE, "prop too long: " + key, e);
}

Prevention

When it happens

Trigger: Calling gdbwriter's row-to-GdbElement conversion (addProperty) with a vertex/edge property whose String value length exceeds MapperConfig.getInstance().getMaxPropKeyLength(). Non-String property values never trigger it.

Common situations: Loading source columns containing long JSON blobs, base64 strings, URLs with query strings, or free-text descriptions into GDB vertex properties; defaults for maxPropKeyLength/maxPropValueLength left untouched.

Related errors


AI-assisted analysis of alibaba/DataX@80ec23d5c5 (2026-08-14). Data as JSON: /api/errors/84319c442dd2c729. Report an issue: GitHub.