apache/seatunnel · error · SeaTunnelRuntimeException

COMMON-02

COMMON-02

Error message

Json JSON convert/parse '<payload>' operation failed.

What it means

OggJsonDeserializationSchema.deserializeMessage wraps any RuntimeException raised while parsing an Oracle GoldenGate (Ogg) JSON message into a SeaTunnelRow, unless ignoreParseErrors is enabled. The parsed JSON node's toString is embedded in the message. It indicates the message's envelope (op/before/after/ table keys) or values did not match the expected Ogg format.

Source

Thrown at seatunnel-formats/seatunnel-format-json/src/main/java/org/apache/seatunnel/format/json/ogg/OggJsonDeserializationSchema.java:237

                                String.format(REPLICA_IDENTITY_EXCEPTION, "DELETE"));
                    }
                    beforeDelete.setRowKind(RowKind.DELETE);
                    if (tablePath != null) {
                        beforeDelete.setTableId(tablePath.toString());
                    }
                    if (tsNode != null) {
                        MetadataUtil.setEventTime(beforeDelete, ts);
                    }
                    out.collect(beforeDelete);
                    break;
                default:
                    throw new IllegalStateException(
                            String.format("Unknown operation type '%s'.", op));
            }

        } catch (RuntimeException e) {
            if (!ignoreParseErrors) {
                throw CommonError.jsonOperationError(FORMAT, jsonNode.toString(), e);
            }
        }
    }

    private ObjectNode convertBytes(byte[] message) throws SeaTunnelRuntimeException {
        try {
            return (ObjectNode) jsonDeserializer.deserializeToJsonNode(message);
        } catch (Throwable t) {
            throw CommonError.jsonOperationError(FORMAT, new String(message), t);
        }
    }

    @Override
    public void deserialize(byte[] message, Collector<SeaTunnelRow> out) {
        TablePath tablePath =
                Optional.ofNullable(catalogTable).map(CatalogTable::getTablePath).orElse(null);
        deserializeMessage(message, out, tablePath);
    }

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Inspect jsonNode in the error message and verify op/op_type values are among the supported set (I/U/D etc.)
  2. Adjust the Ogg replicat configuration so it emits the expected JSON structure and only supported operations
  3. Update the connector's Oracle table schema to match upstream DDL changes
  4. Set ignore-parse-errors=true to skip non-conforming messages rather than fail the job

Example fix

// before: message with op "TRUNCATE" reaches parser -> Unknown operation type 'TRUNCATE'
// after: filter unsupported ops upstream
[metrics: op_type in ('I','U','D')] // exclude TRUNCATE in Ogg handler or enable ignore-parse-errors
Defensive patterns

Strategy: validation

Validate before calling

JsonNode root = mapper.readTree(message);
String op = root.path("op_type").asText("");
boolean supported = op.equals("I") || op.equals("U") || op.equals("D");

Type guard

boolean isSupportedOggOp(JsonNode n) {
    String op = n == null ? null : n.path("op_type").asText(null);
    return "I".equals(op) || "U".equals(op) || "D".equals(op);
}

Try / catch

try {
    schema.deserialize(message, out);
} catch (SeaTunnelRuntimeException e) {
    log.warn("Skip malformed ogg message: {}", message, e);
}

Prevention

When it happens

Trigger: deserializeMessage processes an Ogg JSON message where the operation 'op' value is unrecognized (hits IllegalStateException) or row conversion of before/after fields throws a RuntimeException (type mismatch, missing 'table'/'op_type' keys).

Common situations: GoldenGate trail files configured with unsupported op_type values; schema drift on the Oracle source changing column types; Ogg replicat emitting extra/renamed metadata keys; heartbeats/markers routed into the data topic.

Understand the failure class

Background: JSON parse error: "Unexpected token" / "not valid JSON" / "failed to parse" — what JSON parsers are really complaining about — this error's family across 45 libraries.

Related errors


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