{"record":{"id":"ea7c78d24b5164fe","repo":"GoogleContainerTools/jib","slug":"property-must-be-an-integer-value","errorCode":null,"errorMessage":"property + \" must be an integer: \" + value","messagePattern":"property \\+ \" must be an integer: \" \\+ value","errorType":"validation","errorClass":"NumberFormatException","httpStatus":null,"severity":"error","filePath":"jib-core/src/main/java/com/google/cloud/tools/jib/global/JibSystemProperties.java","lineNumber":136,"sourceCode":"   * jib.skipExistingImages} system property.\n   *\n   * @return {@code true} if Jib should skip pushing tags to existing images, {@code false} if not\n   */\n  public static boolean skipExistingImages() {\n    return Boolean.getBoolean(SKIP_EXISTING_IMAGES);\n  }\n\n  private static void checkNumericSystemProperty(String property, Range<Integer> validRange) {\n    String value = System.getProperty(property);\n    if (value == null) {\n      return;\n    }\n\n    int parsed;\n    try {\n      parsed = Integer.parseInt(value);\n    } catch (NumberFormatException ex) {\n      throw new NumberFormatException(property + \" must be an integer: \" + value);\n    }\n    if (validRange.hasLowerBound() && validRange.lowerEndpoint() > parsed) {\n      throw new NumberFormatException(\n          property + \" cannot be less than \" + validRange.lowerEndpoint() + \": \" + value);\n    } else if (validRange.hasUpperBound() && validRange.upperEndpoint() < parsed) {\n      throw new NumberFormatException(\n          property + \" cannot be greater than \" + validRange.upperEndpoint() + \": \" + value);\n    }\n  }\n\n  private JibSystemProperties() {}\n}\n","sourceCodeStart":118,"sourceCodeEnd":149,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-core/src/main/java/com/google/cloud/tools/jib/global/JibSystemProperties.java#L118-L149","documentation":"JibSystemProperties.checkNumericSystemProperty validates numeric Jib system properties (HTTP timeout, proxy port). This NumberFormatException is thrown when the property value cannot be parsed as an integer at all. It wraps the parse failure with the property name and offending value for clarity.","triggerScenarios":"Setting a system property like sendCredentialsOverHttp... specifically jib.httpTimeout or jib.proxy.port (or their -D flags) to a non-integer string, e.g. -Djib.httpTimeout=30s or -Djib.proxy.port=abc.","commonSituations":"Typos in numeric flags, passing values with units (\"30s\", \"10ms\"), copying config values with quotes or whitespace, mixing up property names so a non-numeric value lands in a numeric property.","solutions":["Set the property to a plain integer, e.g. -Djib.httpTimeout=30","Remove units and quotes from the value","Check you are setting the correct property name with a numeric value","Validate build.gradle/pom.xml and CI config for the -D flags"],"exampleFix":"// before\njib {\n  // containerizer.environment or jvmFlags passing bad value\n}\n// gradle: gradle jib -Djib.httpTimeout=30s\n// after\ngradle jib -Djib.httpTimeout=30000","handlingStrategy":"validation","validationCode":"String v = System.getProperty(\"jib.httpTimeout\");\nif (v != null && !v.matches(\"\\\\d+\")) throw new IllegalArgumentException(\"jib.httpTimeout must be an integer: \" + v);","typeGuard":null,"tryCatchPattern":"try { jibStep(); } catch (NumberFormatException e) { if (e.getMessage().contains(\"must be an integer\")) { failBuild(\"Fix -Djib property value: \" + e.getMessage()); } throw e; }","preventionTips":["Pass numeric Jib properties as bare integers with no units or quotes","Keep property names and values together in one place (gradle.properties/CI vars) to avoid mixups","Lint CI scripts for -Djib.* flags"],"tags":["configuration","system-properties","number-format","validation"],"backgroundTag":"invalid-env-var-value","analyzedSha":"fb949e2676afbbd7dd7a1ef61e20251931325654","analyzedAt":"2026-09-06T14:04:09.491Z","contentChangedAt":"2026-09-06T14:04:09.491Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}