{"record":{"id":"656db5c7e336c7f3","repo":"apache/beam","slug":"could-not-find-coder-for-urn-urn","errorCode":null,"errorMessage":"Could not find coder for URN \" + urn","messagePattern":"Could not find coder for URN \" \\+ urn","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/typescript/src/apache_beam/coders/coders.ts","lineNumber":52,"sourceCode":" * and they can register a constructor that takes zero or more parameters as input.\n * Constructor input parameters for a coder are usually internal coders that represent sub-components\n * of the enclosing coder (e.g. a coder of key-value pairs (a.k.a. `KVCoder`) may receive the coder\n * for the key and the coder for the value as parameters).\n */\nclass CoderRegistry {\n  internal_registry: Record<string, (...args: unknown[]) => Coder<unknown>> =\n    {};\n\n  getCoder(\n    urn: string,\n    payload: Uint8Array | undefined = undefined,\n    ...components: Coder<unknown>[]\n  ) {\n    const constructor: (...args) => Coder<unknown> =\n      this.internal_registry[urn];\n\n    if (constructor === undefined) {\n      throw new Error(\"Could not find coder for URN \" + urn);\n    }\n    if (payload && payload.length > 0) {\n      return constructor(payload, ...components);\n    } else {\n      return constructor(...components);\n    }\n  }\n\n  // TODO: Figure out how to branch on constructors (called with new) and\n  // ordinary functions.\n  register(urn: string, coderClass: Class<Coder<unknown>>) {\n    this.registerClass(urn, coderClass);\n  }\n\n  registerClass(urn: string, coderClass: Class<Coder<unknown>>) {\n    this.registerConstructor(urn, (...args) => new coderClass(...args));\n  }\n","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/typescript/src/apache_beam/coders/coders.ts#L34-L70","documentation":"apache_beam.transforms.external.ManagedTransform.__init__ raises ValueError when the managed transform's underlying SchemaTransform identifier has no pre-built expansion service jar registered in MANAGED_TRANSFORM_URN_TO_JAR_TARGET_MAPPING. Beam needs a Java expansion service jar to expand the managed transform cross-language, and it only knows jar targets for a fixed set of managed URNs. An unknown identifier means the transform cannot be expanded with the default service.","triggerScenarios":"Constructing a ManagedTransform (or using ManagedRead/ManagedWrite) whose resolved underlying_transform_identifier is not a key of MANAGED_TRANSFORM_URN_TO_JAR_TARGET_MAPPING, e.g. a typo'd or newly added managed transform on an older Beam SDK, while relying on the default expansion service.","commonSituations":"Using a managed transform added in a newer Beam version with an older Python SDK installed; misspelling the source/transform name; passing a custom identifier string; Beam version skew between docs and installed package.","solutions":["Upgrade apache-beam to a version whose MANAGED_TRANSFORM_URN_TO_JAR_TARGET_MAPPING contains the transform identifier.","Fix the typo / use one of the supported managed transform names (e.g. for ManagedRead: iceberg, kafka, bigquery).","Supply an explicit expansion_service=... (address or jar spec) instead of relying on the default jar mapping."],"exampleFix":"// before\nbeam.ManagedRead(source='iceberg_v2')  # unknown identifier\n// after\nbeam.ManagedRead(source='iceberg')  # or upgrade: pip install -U apache-beam","handlingStrategy":"validation","validationCode":"if mgr.Closed() { return errors.New(\"instruction closed; reopen with new instruction\") }","typeGuard":"func (s *ScopedDataManager) CanOpen() bool { s.mu.Lock(); defer s.mu.Unlock(); return !s.closed }","tryCatchPattern":"ch, err := mgr.Open(ctx, port)\nif err != nil && strings.Contains(err.Error(), \"no longer processing\") { return ErrInstructionClosed }\nreturn err","preventionTips":["Open ports before finishing the instruction","Avoid holding ScopedDataManager references past Close","Check closed state in concurrent openers"],"tags":["python","apache-beam","cross-language","expansion-service","managed-transform"],"backgroundTag":"resource-not-found","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"}