GoogleContainerTools/jib · error · JibPluginExtensionException
extension crashed: ${ex.getMessage()}
Error message
extension crashed: ${ex.getMessage()} What it means
The Jib plugin extension itself threw a RuntimeException while executing. MavenProjectProperties.runPluginExtension catches it and re-wraps it as a JibPluginExtensionException with the message 'extension crashed: <original message>', preserving the original as the cause.
Source
Thrown at jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/MavenProjectProperties.java:686
+ extraConfigType.get().getName()
+ "\">");
} else {
// configs is of type Optional, so this cast always succeeds
// without the isInstance() check above. (Note generic <T> is erased at runtime.)
extraConfig = (Optional<T>) configs;
}
}
try {
return ((JibMavenPluginExtension<T>) extension)
.extendContainerBuildPlan(
buildPlan,
config.getProperties(),
extraConfig,
new MavenExtensionData(project, session),
new PluginExtensionLogger(this::log));
} catch (RuntimeException ex) {
throw new JibPluginExtensionException(
extension.getClass(), "extension crashed: " + ex.getMessage(), ex);
}
}
private JibMavenPluginExtension<?> findConfiguredExtension(
List<JibMavenPluginExtension<?>> extensions, ExtensionConfiguration config)
throws JibPluginExtensionException {
Predicate<JibMavenPluginExtension<?>> matchesClassName =
extension -> extension.getClass().getName().equals(config.getExtensionClass());
Optional<JibMavenPluginExtension<?>> found =
extensions.stream().filter(matchesClassName).findFirst();
if (!found.isPresent()) {
throw new JibPluginExtensionException(
NullExtension.class,
"extension configured but not discovered on Jib runtime classpath: "
+ config.getExtensionClass());
}
return found.get();View on GitHub (pinned to fb949e2676)
Solutions
- Read the caused-by stack trace below 'extension crashed' to find the real exception thrown inside the extension.
- Upgrade (or align) the extension and jib-maven-plugin versions — crashes often stem from version incompatibilities.
- Fix the extension's inputs: missing configuration values, absent files, or project layout assumptions that triggered the NPE/error.
- If it's a third-party extension bug, reproduce minimally and report it upstream with the full stack trace.
Defensive patterns
Strategy: try-catch
Validate before calling
// Smoke-test the extension in isolation before wiring it into the build: // call extendContainerBuildPlan with a minimal plan in a unit test to surface NPEs early.
Try / catch
try {
// mvn jib:build with extensions
} catch (JibPluginExtensionException e) {
if (e.getMessage().startsWith("extension crashed:")) {
e.getCause().printStackTrace(); // inspect the real RuntimeException inside the extension
}
throw e;
} Prevention
- Always read the caused-by chain under 'extension crashed' — it contains the root exception.
- Keep jib-maven-plugin and extension versions compatible (check the extension's supported Jib range).
- Write unit tests for custom extensions covering missing-config and missing-file cases.
- Pin extension versions in pom.xml; avoid floating SNAPSHOT dependencies.
When it happens
Trigger: Any unchecked exception inside the extension's extendContainerBuildPlan or applyContainerBuildPlan: NPEs from missing config values, ClassNotFound/NoClassDefFound from classpath conflicts, illegal argument states in extension logic, or failures reading project resources.
Common situations: Third-party extensions (e.g. jib-spring-boot) hitting unexpected project layouts; extension code assuming files/classes that don't exist in this project; extension version incompatibility with the Jib core version on the plugin classpath.
Related errors
- extension crashed: ${ex.getMessage()}
- error running extension '${extensionName}': ${ex.getMessage(
- invalid base image reference: ${buildPlan.getBaseImage()}
- extension ${extension.getClass().getSimpleName()} does not e
- error running extension '<extensionClassName>': <message>
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/6be07e59ab17b860.
Report an issue: GitHub.