{"record":{"id":"ff082d5e90eb0845","repo":"apache/iceberg","slug":"unsupported-version","errorCode":null,"errorMessage":"Unsupported version: ","messagePattern":"Unsupported version: ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/source/split/IcebergSourceSplit.java","lineNumber":179,"sourceCode":"\n      serializedBytesCache = out.getCopyOfBuffer();\n      out.clear();\n    }\n\n    return serializedBytesCache;\n  }\n\n  private static void writeTaskJson(DataOutputSerializer out, String taskJson, int version)\n      throws IOException {\n    switch (version) {\n      case 2:\n        out.writeUTF(taskJson);\n        break;\n      case 3:\n        SerializerHelper.writeLongUTF(out, taskJson);\n        break;\n      default:\n        throw new IllegalArgumentException(\"Unsupported version: \" + version);\n    }\n  }\n\n  static IcebergSourceSplit deserializeV2(byte[] serialized, boolean caseSensitive)\n      throws IOException {\n    return deserialize(serialized, caseSensitive, 2);\n  }\n\n  static IcebergSourceSplit deserializeV3(byte[] serialized, boolean caseSensitive)\n      throws IOException {\n    return deserialize(serialized, caseSensitive, 3);\n  }\n\n  private static IcebergSourceSplit deserialize(\n      byte[] serialized, boolean caseSensitive, int version) throws IOException {\n    DataInputDeserializer in = new DataInputDeserializer(serialized);\n    int fileOffset = in.readInt();\n    long recordOffset = in.readLong();","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/source/split/IcebergSourceSplit.java#L161-L197","documentation":"IcebergSourceSplit.writeTaskJson serializes the split's task JSON with a switch over the format version; versions 2 and 3 are handled, any other version throws IllegalArgumentException. An unsupported serialization version was requested.","triggerScenarios":"serialize() called with a version constant not in {2,3} — only possible via internal/version-mismatch code paths or manual use of package-private serialization methods.","commonSituations":"Custom code calling package-private serialize/deserialize methods with an arbitrary version; connector internals misconfigured by classpath mixing.","solutions":["Use the standard IcebergSourceSplitSerializer (serializeV2/deserializeV2) entry points instead of calling internal versioned methods.","Align connector versions to avoid mismatched internal version constants.","Report a bug if this arises from stock connector code — it indicates an internal version constant error."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Only use supported serialization entry points\nint v = version; // must be 2 or 3\nif (v != 2 && v != 3) throw new IllegalArgumentException(\"Use IcebergSourceSplitSerializer instead of version \" + v);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use IcebergSourceSplitSerializer / serializeV2-deserializeV2 public paths","Do not call package-private versioned serialize methods with arbitrary versions","Keep connector internals from being mixed across versions"],"tags":["flink","serialization","version-mismatch","illegal-argument"],"backgroundTag":"unsupported-enum-value","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}