{"record":{"id":"d44269fd7266fd14","repo":"apache/beam","slug":"unknown-s-s-windowingstrategytranslation","errorCode":null,"errorMessage":"Unknown %s: %s","messagePattern":"Unknown (.+?): (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/core/src/main/java/org/apache/beam/sdk/util/construction/WindowingStrategyTranslation.java","lineNumber":177,"sourceCode":"        throw new IllegalArgumentException(\n            String.format(\n                \"Cannot convert unknown %s to %s: %s\",\n                RunnerApi.OnTimeBehavior.class.getCanonicalName(),\n                OnTimeBehavior.class.getCanonicalName(),\n                proto));\n    }\n  }\n\n  public static RunnerApi.OutputTime.Enum toProto(TimestampCombiner timestampCombiner) {\n    switch (timestampCombiner) {\n      case EARLIEST:\n        return OutputTime.Enum.EARLIEST_IN_PANE;\n      case END_OF_WINDOW:\n        return OutputTime.Enum.END_OF_WINDOW;\n      case LATEST:\n        return OutputTime.Enum.LATEST_IN_PANE;\n      default:\n        throw new IllegalArgumentException(\n            String.format(\n                \"Unknown %s: %s\", TimestampCombiner.class.getSimpleName(), timestampCombiner));\n    }\n  }\n\n  public static TimestampCombiner timestampCombinerFromProto(RunnerApi.OutputTime.Enum proto) {\n    switch (proto) {\n      case EARLIEST_IN_PANE:\n        return TimestampCombiner.EARLIEST;\n      case END_OF_WINDOW:\n        return TimestampCombiner.END_OF_WINDOW;\n      case LATEST_IN_PANE:\n        return TimestampCombiner.LATEST;\n      case UNRECOGNIZED:\n      default:\n        // Whether or not it is proto that cannot recognize it (due to the version of the\n        // generated code we link to) or the switch hasn't been updated to handle it,\n        // the situation is the same: we don't know what this OutputTime means","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/util/construction/WindowingStrategyTranslation.java#L159-L195","documentation":"Thrown by WindowingStrategyTranslation.toProto when a TimestampCombiner value has no mapping to a RunnerApi.OutputTime.Enum proto value. The switch in the translation table only covers the known combiners; anything else (typically a newer SDK combiner sent to an older runner) falls into the default branch. It signals the Java TimestampCombiner enum and the Beam portability proto have drifted out of sync.","triggerScenarios":"Calling WindowingStrategyTranslation.toProto (directly or via windowingStrategyProto) on a WindowingStrategy whose timestampCombiner is a TimestampCombiner value not handled by the switch, e.g. a newly added combiner running against an older generated RunnerApi protos jar.","commonSituations":"Mixing Beam SDK versions across SDK harness and runner; upgrading the Beam Java SDK while a pinned beam-model pipeline jar is stale; custom or vendored TimestampCombiner values.","solutions":["Align beam-sdks-java-core and beam-model versions so TimestampCombiner and RunnerApi.OutputTime.Enum are from the same release.","Pin the runner and SDK harness to the same Beam version used at pipeline construction time.","If you legitimately added a new TimestampCombiner, add the corresponding case mapping to RunnerApi.OutputTime.Enum in WindowingStrategyTranslation.toProto.","Check for shaded/duplicated beam-model jars on the classpath bringing an older proto enum."],"exampleFix":"// before (mismatched versions)\nimplementation \"org.apache.beam:beam-sdks-java-core:2.50.0\"\nimplementation \"org.apache.beam:beam-model-pipeline:2.40.0\"\n// after\nimplementation \"org.apache.beam:beam-sdks-java-core:2.50.0\"\nimplementation \"org.apache.beam:beam-model-pipeline:2.50.0\"","handlingStrategy":"validation","validationCode":"import static org.apache.beam.sdk.util.construction.WindowingStrategyTranslation.*;\nSet<TimestampCombiner> supported = EnumSet.of(TimestampCombiner.EARLIEST, TimestampCombiner.LATEST);\nif (!supported.contains(strategy.getTimestampCombiner())) throw new IllegalArgumentException(\"Unsupported TimestampCombiner for this proto version: \" + strategy.getTimestampCombiner());","typeGuard":"boolean isMappable(TimestampCombiner c) { switch (c) { case EARLIEST: case LATEST: return true; default: return false; } }","tryCatchPattern":"try { proto = WindowingStrategyTranslation.windowingStrategyProto(strategy); } catch (IllegalArgumentException e) { log.error(\"TimestampCombiner not representable in proto: {}\", strategy.getTimestampCombiner(), e); throw e; }","preventionTips":["Keep all Beam artifacts (sdks-java-core, beam-model-pipeline) on the same version","Avoid custom TimestampCombiner values unless you also update the proto mapping","Run mvn dependency:tree to detect version drift of beam-model artifacts"],"tags":["java","beam","windowing","enum-conversion","proto"],"backgroundTag":"invalid-enum-value","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}