{"record":{"id":"ba82ed4c8a80c1f1","repo":"GoogleContainerTools/jib","slug":"message-from-buildstepsexecutionexception","errorCode":null,"errorMessage":"<message from BuildStepsExecutionException>","messagePattern":"<message from BuildStepsExecutionException>","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java","lineNumber":167,"sourceCode":"\n    } catch (IncompatibleBaseImageJavaVersionException ex) {\n      throw new MojoExecutionException(\n          HelpfulSuggestions.forIncompatibleBaseImageJavaVersionForMaven(\n              ex.getBaseImageMajorJavaVersion(), ex.getProjectMajorJavaVersion()),\n          ex);\n\n    } catch (InvalidImageReferenceException ex) {\n      throw new MojoExecutionException(\n          HelpfulSuggestions.forInvalidImageReference(ex.getInvalidReference()), ex);\n\n    } catch (IOException\n        | CacheDirectoryCreationException\n        | MainClassInferenceException\n        | InvalidGlobalConfigException ex) {\n      throw new MojoExecutionException(ex.getMessage(), ex);\n\n    } catch (BuildStepsExecutionException ex) {\n      throw new MojoExecutionException(ex.getMessage(), ex.getCause());\n\n    } catch (ExtraDirectoryNotFoundException ex) {\n      throw new MojoExecutionException(\n          \"<extraDirectories><paths> contain \\\"from\\\" directory that doesn't exist locally: \"\n              + ex.getPath(),\n          ex);\n    } finally {\n      tempDirectoryProvider.close();\n      MojoCommon.finishUpdateChecker(projectProperties, updateCheckFuture);\n      projectProperties.waitForLoggingThread();\n      getLog().info(\"\");\n    }\n  }\n}\n","sourceCodeStart":149,"sourceCodeEnd":182,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java#L149-L182","documentation":"The core Jib build steps (building and exporting the image to the Docker daemon) failed. BuildDockerMojo.execute() catches BuildStepsExecutionException and rethrows its message as a MojoExecutionException, using ex.getCause() as the root cause — so the interesting underlying error is in the 'Caused by' chain, not the top-line message.","triggerScenarios":"Any failure during the dockerBuild runBuild() pipeline: registry authentication failures pulling the base image, network errors, layer cache problems, or export errors writing to the Docker daemon — anything that makes BuildStepsRunner throw BuildStepsExecutionException.","commonSituations":"Docker daemon stopped or unreachable while jib:dockerBuild runs; wrong registry credentials in settings.xml; transient network failure pulling the base image; corrupted local Jib cache.","solutions":["Inspect the 'Caused by' exception in the Maven output to find the real root cause and address it specifically.","If the cause is daemon-related, verify Docker is installed and running (docker info) — jib:dockerBuild requires a reachable daemon.","Re-run after fixing credentials/network issues; for cache corruption delete the Jib cache directory (default ~/.cache/google-cloud-tools-java/jib or target/jib-cache).","Run with -X (mvn -X jib:dockerBuild) for full stack traces when the cause chain is unclear."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Pre-flight: docker info || echo 'Docker daemon not reachable'\n// and: mvn -q jib:dockerBuild -Djib.skip=false --dry-run scenarios in CI","typeGuard":null,"tryCatchPattern":"try {\n  mvn jib:dockerBuild\n} catch (MojoExecutionException e) {\n  Throwable root = e; while (root.getCause() != null) root = root.getCause();\n  // inspect root (e.g. registry auth, network) and retry transient failures\n}","preventionTips":["Ensure the Docker daemon is running before jib:dockerBuild in local and CI environments.","Always read the 'Caused by' chain — the top message is only the wrapper.","Configure registry credentials in settings.xml ahead of the build.","Retry transient network/registry failures rather than assuming a config bug."],"tags":["maven","jib","docker","build-failure"],"backgroundTag":"build-step-failed","analyzedSha":"fb949e2676afbbd7dd7a1ef61e20251931325654","analyzedAt":"2026-09-06T14:04:09.491Z","contentChangedAt":"2026-09-06T14:04:09.491Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}