{"record":{"id":"a3cd5cb4ef881e5f","repo":"apache/beam","slug":"missing-serialized-typedescriptor","errorCode":null,"errorMessage":"Missing serialized typeDescriptor","messagePattern":"Missing serialized typeDescriptor","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/core/src/main/java/org/apache/beam/sdk/util/construction/CoderTranslators.java","lineNumber":233,"sourceCode":"        payload\n            .addAdditionalCoderInfosBuilder()\n            .setUrn(TYPE_DESCRIPTOR_URN)\n            .setPayload(\n                ByteString.copyFrom(\n                    SerializableUtils.serializeToByteArray(from.getEncodedTypeDescriptor())));\n        return payload.build().toByteArray();\n      }\n\n      @Override\n      public SchemaCoder<T> fromComponents(\n          List<Coder<?>> components, byte[] payload, TranslationContext context) {\n        checkArgument(\n            components.isEmpty(), \"Expected empty component list, but received: %s\", components);\n        try {\n          SchemaApi.SchemaCoderPayload schemaCoderPayload =\n              SchemaApi.SchemaCoderPayload.parseFrom(payload);\n          if (schemaCoderPayload.getAdditionalCoderInfosCount() == 0) {\n            throw new IllegalArgumentException(\"Missing serialized typeDescriptor\");\n          }\n          TypeDescriptor<T> typeDescriptor =\n              (TypeDescriptor<T>)\n                  SerializableUtils.deserializeFromByteArray(\n                      schemaCoderPayload.getAdditionalCoderInfos(0).getPayload().toByteArray(),\n                      \"typeDescriptor\");\n          SerializableFunction<T, Row> toRowFunction =\n              (SerializableFunction<T, Row>)\n                  SerializableUtils.deserializeFromByteArray(\n                      schemaCoderPayload.getToRowFn().getPayload().toByteArray(), \"toRowFunction\");\n          SerializableFunction<Row, T> fromRowFunction =\n              (SerializableFunction<Row, T>)\n                  SerializableUtils.deserializeFromByteArray(\n                      schemaCoderPayload.getFromRowFn().getPayload().toByteArray(),\n                      \"fromRowFunction\");\n\n          Schema schema = SchemaTranslation.schemaFromProto(schemaCoderPayload.getSchema());\n          return SchemaCoder.of(schema, typeDescriptor, toRowFunction, fromRowFunction);","sourceCodeStart":215,"sourceCodeEnd":251,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/util/construction/CoderTranslators.java#L215-L251","documentation":"When reconstructing a SchemaCoder from its proto payload, the payload must carry at least one additional coder info containing the serialized TypeDescriptor. If SchemaCoderPayload has none, fromComponents throws IllegalArgumentException('Missing serialized typeDescriptor'), since a SchemaCoder cannot be rebuilt without knowing its element type.","triggerScenarios":"Decoding a SchemaCoder payload that was written by an older Beam version lacking additionalCoderInfos, or a hand-constructed SchemaApi.SchemaCoderPayload without the typeDescriptor info entry.","commonSituations":"Cross-version pipeline proto incompatibilities (schema coder payload format changed over Beam releases); custom serialization tools that build the payload incompletely.","solutions":["Regenerate the pipeline proto with the same (or newer, compatible) Beam SDK version that writes the typeDescriptor info","If building SchemaCoderPayload manually, set additional coder infos with the SerializableUtils-serialized TypeDescriptor","Audit custom graph-export code for dropped additionalCoderInfos"],"exampleFix":"// before\nSchemaCoderPayload.newBuilder().setSchema(schemaProto).build(); // no infos\n// after\nSchemaCoderPayload.newBuilder()\n    .setSchema(schemaProto)\n    .addAdditionalCoderInfos(CoderInfo.newBuilder()\n        .setPayload(ByteString.copyFrom(SerializableUtils.serializeToByteArray(typeDescriptor))))\n    .build();","handlingStrategy":"validation","validationCode":"SchemaApi.SchemaCoderPayload p = SchemaApi.SchemaCoderPayload.parseFrom(payload);\nif (p.getAdditionalCoderInfosCount() == 0) {\n  throw new IllegalArgumentException(\"payload lacks typeDescriptor; regenerate with Beam >= writer version\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  return CoderTranslation.fromProto(coderProto, components);\n} catch (IllegalArgumentException e) {\n  if (e.getMessage().contains(\"Missing serialized typeDescriptor\")) {\n    throw new IOException(\"SchemaCoder payload missing typeDescriptor\", e);\n  }\n  throw e;\n}","preventionTips":["Always write additionalCoderInfos when constructing SchemaCoderPayloads","Keep pipeline-proto producer and consumer Beam versions aligned","Add round-trip tests for schema coder serialization"],"tags":["java","beam","schemacoder","protobuf"],"backgroundTag":"missing-required-argument","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}