{"record":{"id":"4ea7b01d387ca9e7","repo":"GoogleContainerTools/jib","slug":"path","errorCode":null,"errorMessage":"${path}","messagePattern":"\\$\\{path\\}","errorType":"validation","errorClass":"InvalidContainerVolumeException","httpStatus":null,"severity":"error","filePath":"jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/PluginConfigurationProcessor.java","lineNumber":838,"sourceCode":"  }\n\n  /**\n   * Parses the list of raw volumes directories to a set of {@link AbsoluteUnixPath}.\n   *\n   * @param rawConfiguration raw configuration data\n   * @return the set of parsed volumes.\n   * @throws InvalidContainerVolumeException if {@code volumes} are not valid absolute Unix paths\n   */\n  @VisibleForTesting\n  static Set<AbsoluteUnixPath> getVolumesSet(RawConfiguration rawConfiguration)\n      throws InvalidContainerVolumeException {\n    Set<AbsoluteUnixPath> volumes = new HashSet<>();\n    for (String path : rawConfiguration.getVolumes()) {\n      try {\n        AbsoluteUnixPath absoluteUnixPath = AbsoluteUnixPath.get(path);\n        volumes.add(absoluteUnixPath);\n      } catch (IllegalArgumentException exception) {\n        throw new InvalidContainerVolumeException(path, path, exception);\n      }\n    }\n\n    return volumes;\n  }\n\n  /**\n   * Gets the value of the {@code appRoot} parameter. If the parameter is empty, returns {@code\n   * /var/lib/jetty/webapps/ROOT} for WAR projects or {@link JavaContainerBuilder#DEFAULT_APP_ROOT}\n   * for other projects.\n   *\n   * @param rawConfiguration raw configuration data\n   * @param projectProperties the project properties\n   * @return the app root value\n   * @throws InvalidAppRootException if {@code appRoot} value is not an absolute Unix path\n   */\n  @VisibleForTesting\n  static AbsoluteUnixPath getAppRootChecked(","sourceCodeStart":820,"sourceCodeEnd":856,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/PluginConfigurationProcessor.java#L820-L856","documentation":"Jib's getVolumesSet converts each configured container volume path to an AbsoluteUnixPath. If a configured volume string is not a valid absolute Unix path (e.g. relative, backslashes, or empty), the IllegalArgumentException from AbsoluteUnixPath.get is rethrown as InvalidContainerVolumeException with the offending path as both value and message template.","triggerScenarios":"processCommonConfiguration -> getVolumesSet encounters a <volumes>/<volume> value where AbsoluteUnixPath.get(path) throws IllegalArgumentException — path does not start with '/' or contains invalid segments.","commonSituations":"Writing volumes: [app/data] without leading slash; copying Windows-style paths like C:\\data; typos such as a leading space; empty string in the volumes list.","solutions":["Change the volume to an absolute Unix path starting with '/', e.g. /app/data.","Replace backslashes with forward slashes and drop drive letters if migrating from Windows path conventions.","Remove empty or whitespace-only entries from the volumes list."],"exampleFix":"// before (Gradle)\ncontainer.volumes = ['app/data']\n// after\ncontainer.volumes = ['/app/data']","handlingStrategy":"validation","validationCode":"// Validate volume paths before configuring Jib\nvolumes.forEach(v -> {\n  if (!v.startsWith(\"/\"))\n    throw new IllegalArgumentException(\"volume must be absolute unix path: \" + v);\n});","typeGuard":null,"tryCatchPattern":"try {\n  processCommonConfiguration(...);\n} catch (InvalidContainerVolumeException e) {\n  logger.error(\"Invalid volume '\" + e.getInvalidVolume() + \"'; use absolute unix paths like /app/data\");\n}","preventionTips":["Volume paths must start with '/' and use forward slashes","Never reuse Windows paths or shell variable expansions unchecked in volumes config","Keep volumes in a validated constant list in the build script"],"tags":["container-image","path-validation","java"],"backgroundTag":"invalid-argument-format","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"}