apache/seatunnel · error · IMapStorageException

deserialize data error: data is s%, className is s%

Error message

deserialize data error: data is s%, className is s%

What it means

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.

Solutions

  1. Verify the storage directory was not written by an incompatible SeaTunnel version; align cluster versions.
  2. Inspect/clean corrupted WAL segment files under businessRootPath; restore from backup if available.
  3. If classes changed, migrate the data with the old version first, or start with a fresh storage directory (destroy + re-init).
  4. Check HDFS file integrity (hdfs fsck) for corrupted blocks.

Example fix

// before
throw new IMapStorageException(e, "deserialize data error: data is s%, className is s%", data, className);
// after (verify schema compatibility before load)
if (!isSchemaCompatible(className)) { throw new IMapStorageException("incompatible schema: " + className); }
return serializer.deserialize(data, clazz);
Defensive patterns

Strategy: try-catch

Try / catch

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 */ } }

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "cannot parse invalid wire-format data", "cannot unmarshal", "failed unmarshalling": protobuf unmarshal errors explained — this error's family across 10 libraries.

Related errors


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

Appendix: source

Thrown at seatunnel-engine/seatunnel-engine-storage/imap-storage-plugins/imap-storage-file/src/main/java/org/apache/seatunnel/engine/imap/storage/file/common/WALReader.java:123

            }
            if (result.containsKey(key)) {
                continue;
            }
            Object value = deserializeData(data.getValue(), data.getValueClassName());
            result.put(key, value);
        }
        return result;
    }

    private Object deserializeData(byte[] data, String className) {
        try {
            Class<?> clazz = ClassUtils.getClass(className);
            try {
                return serializer.deserialize(data, clazz);
            } catch (IOException e) {
                // log.error("deserialize data error, data is {}, className is {}", data, className,
                // e);
                throw new IMapStorageException(
                        e, "deserialize data error: data is s%, className is s%", data, className);
            }
        } catch (ClassNotFoundException e) {
            //  log.error("deserialize data error, class name is {}", className, e);
            throw new IMapStorageException(
                    e, "deserialize data error, class name is {}", className);
        }
    }
}

View on GitHub (pinned to cf67b549a7)