{"record":{"id":"ef078db4dfe5d056","repo":"apache/beam","slug":"unable-to-convert-pipeline-options-please-check-for-outdated","errorCode":null,"errorMessage":"Unable to convert pipeline options, please check for outdated jackson-core version in the classpath.","messagePattern":"Unable to convert pipeline options, please check for outdated jackson-core version in the classpath\\.","errorType":"exception","errorClass":"java.lang.RuntimeException","httpStatus":null,"severity":"critical","filePath":"sdks/java/core/src/main/java/org/apache/beam/sdk/util/construction/PipelineOptionsTranslation.java","lineNumber":63,"sourceCode":"\n  public static final String PIPELINE_OPTIONS_URN_PREFIX = \"beam:option:\";\n  public static final String PIPELINE_OPTIONS_URN_SUFFIX = \":v1\";\n\n  /** Converts the provided {@link PipelineOptions} to a {@link Struct}. */\n  public static Struct toProto(PipelineOptions options) {\n    Struct.Builder builder = Struct.newBuilder();\n\n    try {\n      // TODO: Officially define URNs for options and their scheme.\n      JsonNode treeNode = MAPPER.valueToTree(options);\n      JsonNode rootOptions = treeNode.get(\"options\");\n      Iterator<Map.Entry<String, JsonNode>> optionsEntries = rootOptions.fields();\n\n      if (!optionsEntries.hasNext()) {\n        // Due to mandatory options there is no way this map can be empty.\n        // If it is, then fail fast as it is due to incompatible jackson-core in the classpath.\n        // (observed with version 2.2.3)\n        throw new RuntimeException(\n            \"Unable to convert pipeline options, please check for outdated jackson-core version in the classpath.\");\n      }\n\n      Map<String, TreeNode> optionsUsingUrns = new HashMap<>();\n      while (optionsEntries.hasNext()) {\n        Map.Entry<String, JsonNode> entry = optionsEntries.next();\n        optionsUsingUrns.put(\n            PIPELINE_OPTIONS_URN_PREFIX\n                + CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, entry.getKey())\n                + PIPELINE_OPTIONS_URN_SUFFIX,\n            entry.getValue());\n      }\n\n      // The JSON format of a Protobuf Struct is the JSON object that is equivalent to that struct\n      // (with values encoded in a standard json-codeable manner). See Beam PR 3719 for more.\n      JsonFormat.parser().merge(MAPPER.writeValueAsString(optionsUsingUrns), builder);\n      return builder.build();\n    } catch (IOException e) {","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/util/construction/PipelineOptionsTranslation.java#L45-L81","documentation":"PipelineOptionsTranslation.toProto serializes PipelineOptions to JSON with Jackson and requires the resulting object to have at least one 'options' entry; mandatory options make an empty map impossible when Jackson works correctly. An empty fields() iterator indicates an incompatible/outdated jackson-core (observed with 2.2.3) silently producing wrong output, so Beam fails fast with this RuntimeException.","triggerScenarios":"Calling PipelineOptionsTranslation.toProto/toJson when the classpath contains an old jackson-core (e.g. 2.2.3) that mis-serializes the options object into an empty root.","commonSituations":"Dependency conflicts pulling an ancient jackson-core transitively; fat jars bundling multiple Jackson versions; shaded/classloader environments resolving the wrong Jackson class.","solutions":["Run 'mvn dependency:tree' (or Gradle dependencies) and force jackson-core to the Beam-managed version, excluding stale transitive versions","Check the runtime classpath/jar for duplicate jackson-core jars and remove outdated ones","Add an explicit jackson-core dependency pinned to the Beam BOM version"],"exampleFix":"// before (pom.xml)\n<dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-core</artifactId><version>2.2.3</version></dependency>\n// after\n<dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-core</artifactId><version>2.16.1</version></dependency>","handlingStrategy":"validation","validationCode":"String version = com.fasterxml.jackson.core.json.PackageVersion.VERSION.toString();\nif (version.compareTo(\"2.14\") < 0) throw new IllegalStateException(\"jackson-core too old: \" + version);","typeGuard":null,"tryCatchPattern":"try { Struct s = PipelineOptionsTranslation.toProto(options); } catch (RuntimeException e) { if (e.getMessage().contains(\"jackson-core\")) throw new IllegalStateException(\"Fix jackson-core version on classpath\", e); throw e; }","preventionTips":["Run dependency:tree and check for old transitive jackson-core","Shade/exclude duplicate Jackson artifacts in fat jars","Pin jackson-core to the Beam BOM version"],"tags":["java","apache-beam","jackson","classpath","dependency-conflict"],"backgroundTag":"missing-dependency","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}