{"record":{"id":"67899aa2f18ee45a","repo":"apache/seatunnel","slug":"deserialize-data-error-data-is-s-classname-is-s","errorCode":null,"errorMessage":"deserialize data error: data is s%, className is s%","messagePattern":"deserialize data error: data is s%, className is s%","errorType":"exception","errorClass":"IMapStorageException","httpStatus":null,"severity":"error","filePath":"seatunnel-engine/seatunnel-engine-storage/imap-storage-plugins/imap-storage-file/src/main/java/org/apache/seatunnel/engine/imap/storage/file/common/WALReader.java","lineNumber":123,"sourceCode":"            }\n            if (result.containsKey(key)) {\n                continue;\n            }\n            Object value = deserializeData(data.getValue(), data.getValueClassName());\n            result.put(key, value);\n        }\n        return result;\n    }\n\n    private Object deserializeData(byte[] data, String className) {\n        try {\n            Class<?> clazz = ClassUtils.getClass(className);\n            try {\n                return serializer.deserialize(data, clazz);\n            } catch (IOException e) {\n                // log.error(\"deserialize data error, data is {}, className is {}\", data, className,\n                // e);\n                throw new IMapStorageException(\n                        e, \"deserialize data error: data is s%, className is s%\", data, className);\n            }\n        } catch (ClassNotFoundException e) {\n            //  log.error(\"deserialize data error, class name is {}\", className, e);\n            throw new IMapStorageException(\n                    e, \"deserialize data error, class name is {}\", className);\n        }\n    }\n}\n","sourceCodeStart":105,"sourceCodeEnd":133,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-storage/imap-storage-plugins/imap-storage-file/src/main/java/org/apache/seatunnel/engine/imap/storage/file/common/WALReader.java#L105-L133","documentation":"WALReader.deserializeData found a class name in the WAL record and successfully resolved the class, but ProtoStuffSerializer.deserialize threw an IOException while decoding the bytes. The stored binary payload does not match the target class schema, so the record cannot be reconstructed.","triggerScenarios":"Calling key()/value() on WAL records whose bytes were written by a different SeaTunnel version or with a modified class schema; truncated or corrupted WAL segment files; records written with a different serializer.","commonSituations":"Engine upgrade that changed serialized classes while reusing an old storage directory; HDFS block corruption after hardware failure; mixing cluster members running different versions against shared storage.","solutions":["Verify the storage directory was not written by an incompatible SeaTunnel version; align cluster versions.","Inspect/clean corrupted WAL segment files under businessRootPath; restore from backup if available.","If classes changed, migrate the data with the old version first, or start with a fresh storage directory (destroy + re-init).","Check HDFS file integrity (hdfs fsck) for corrupted blocks."],"exampleFix":"// before\nthrow new IMapStorageException(e, \"deserialize data error: data is s%, className is s%\", data, className);\n// after (verify schema compatibility before load)\nif (!isSchemaCompatible(className)) { throw new IMapStorageException(\"incompatible schema: \" + className); }\nreturn serializer.deserialize(data, clazz);","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { Object v = walReader.value(record); } catch (IMapStorageException e) { if (e.getMessage().contains(\"deserialize data error\")) { /* skip/poison-log the record, or halt if data must be complete */ } }","preventionTips":["Never share one storage directory across different engine versions","Align all cluster nodes on the same SeaTunnel version","Run hdfs fsck to detect corrupt blocks before recovery","Back up the WAL directory before upgrades"],"tags":["deserialization","corruption","wal","storage"],"backgroundTag":"protobuf-unmarshal-failed","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"}