{"record":{"id":"8c49a2d825ad4d1c","repo":"apache/seatunnel","slug":"unsupported-row-type-rowtype-getclass-getname","errorCode":null,"errorMessage":"Unsupported row type: ${rowType.getClass().getName()}","messagePattern":"Unsupported row type: (.+?)","errorType":"exception","errorClass":"SeaTunnelEngineException","httpStatus":null,"severity":"error","filePath":"seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/SeaTunnelSourceCollector.java","lineNumber":304,"sourceCode":"\n    /** Updates source-side metrics, samples new traces when enabled, and forwards the record. */\n    @Override\n    public void collect(T row) {\n        if (dryRunSampleEnabled && dryRunSampleCount >= dryRunSampleLimit) {\n            return;\n        }\n        try {\n            if (row instanceof SeaTunnelRow) {\n                String tableId = ((SeaTunnelRow) row).getTableId();\n                // init the size of row early with rowType, this way is faster than init the size\n                // without rowType\n                int size;\n                if (rowType instanceof SeaTunnelRowType) {\n                    size = ((SeaTunnelRow) row).getBytesSize((SeaTunnelRowType) rowType);\n                } else if (rowType instanceof MultipleRowType) {\n                    size = ((SeaTunnelRow) row).getBytesSize(rowTypeMap.get(tableId));\n                } else {\n                    throw new SeaTunnelEngineException(\n                            \"Unsupported row type: \" + rowType.getClass().getName());\n                }\n                flowControlGate.audit((SeaTunnelRow) row);\n                connectorMetricsCalcContext.updateMetrics(row, tableId);\n                tryStainTrace((SeaTunnelRow) row);\n            }\n            if (dryRunSamplePrintData) {\n                dryRunSampleCount++;\n                log.info(\"Dry-run sample [source] row {}: {}\", dryRunSampleCount, row);\n            } else if (dryRunSampleEnabled) {\n                dryRunSampleCount++;\n            }\n            sendRecordToNext(new Record<>(row));\n            emptyThisPollNext = false;\n            if (dryRunSampleEnabled) {\n                if (dryRunSampleCount == dryRunSampleLimit && dryRunSampleComplete != null) {\n                    dryRunSampleComplete.run();\n                }","sourceCodeStart":286,"sourceCodeEnd":322,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/SeaTunnelSourceCollector.java#L286-L322","documentation":"SeaTunnelSourceCollector.collect computes a row's byte size using its row type. It supports SeaTunnelRowType (single table) and MultipleRowType (multi-table via a per-table type map); any other SeaTunnelRowType implementation reaches the else branch and throws SeaTunnelEngineException with the class name. This guards the flow-control/metrics path against unknown row-type wrappers.","triggerScenarios":"A source emits rows whose RowType container is neither SeaTunnelRowType nor MultipleRowType — typically a custom catalog table type or a newer/older SeaTunnelRowType variant crossing engine versions.","commonSituations":"Custom source connectors returning bespoke row types; mixed seatunnel-api versions between a connector fat jar and the Zeta engine; schema-change scenarios (multi-table) where the collector's type map is populated only for MultipleRowType.","solutions":["Upgrade/align the connector jar and engine versions so both use the same SeaTunnelRowType classes","Make the source emit standard SeaTunnelRowType (or MultipleRowType for multi-table sources)","Add a branch in SeaTunnelSourceCollector for the new row type if it is legitimately supported","Check the reported class name to identify which connector/version produced the unsupported type"],"exampleFix":"// before (custom source)\nreturn new MyCustomRowType(...); // unsupported by collector\n// after\nreturn new SeaTunnelRowType(new String[]{\"id\"}, new SeaTunnelDataType[]{BasicType.LONG_TYPE});","handlingStrategy":"try-catch","validationCode":"if (!(rowType instanceof SeaTunnelRowType) && !(rowType instanceof MultipleRowType)) throw new IllegalArgumentException(\"Unsupported row type: \" + rowType.getClass().getName());","typeGuard":"boolean isSupportedRowType(SeaTunnelRowType t) { return t instanceof SeaTunnelRowType || t instanceof MultipleRowType; }","tryCatchPattern":"try { collector.collect(row); } catch (SeaTunnelEngineException e) { log.error(\"Row type {} unsupported by engine; align connector jar with engine version\", e.getMessage()); failTask(e); }","preventionTips":["Emit only SeaTunnelRowType or MultipleRowType from sources","Shade/pin seatunnel-api consistently between connectors and engine","Test custom sources end-to-end on Zeta before release"],"tags":["zeta","source","row-type","version-mismatch"],"backgroundTag":"type-mismatch","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}