GoogleContainerTools/jib · error · GradleException
error running extension '${extensionClassName}': ${message}
Error message
error running extension '${extensionClassName}': ${message} What it means
Thrown when a Jib plugin extension fails during execution. Jib extensions (e.g. jib-spring-boot, build layers extensions) are run as part of the build; any exception they throw is wrapped in JibPluginExtensionException and rethrown as a GradleException naming the extension class and its message.
Source
Thrown at jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildDockerTask.java:171
} catch (InvalidFilesModificationTimeException ex) {
throw new GradleException(
"container.filesModificationTime should be an ISO 8601 date-time (see "
+ "DateTimeFormatter.ISO_DATE_TIME) or special keyword \"EPOCH_PLUS_SECOND\": "
+ ex.getInvalidFilesModificationTime(),
ex);
} catch (InvalidCreationTimeException ex) {
throw new GradleException(
"container.creationTime should be an ISO 8601 date-time (see "
+ "DateTimeFormatter.ISO_DATE_TIME) or a special keyword (\"EPOCH\", "
+ "\"USE_CURRENT_TIMESTAMP\"): "
+ ex.getInvalidCreationTime(),
ex);
} catch (JibPluginExtensionException ex) {
String extensionName = ex.getExtensionClass().getName();
throw new GradleException(
"error running extension '" + extensionName + "': " + ex.getMessage(), ex);
} catch (IncompatibleBaseImageJavaVersionException ex) {
throw new GradleException(
HelpfulSuggestions.forIncompatibleBaseImageJavaVersionForGradle(
ex.getBaseImageMajorJavaVersion(), ex.getProjectMajorJavaVersion()),
ex);
} catch (InvalidImageReferenceException ex) {
throw new GradleException(
HelpfulSuggestions.forInvalidImageReference(ex.getInvalidReference()), ex);
} catch (ExtraDirectoryNotFoundException ex) {
throw new GradleException(
"extraDirectories.paths contain \"from\" directory that doesn't exist locally: "
+ ex.getPath(),
ex);
} finally {View on GitHub (pinned to fb949e2676)
Solutions
- Read the nested cause: run with --stacktrace/--info to see the underlying extension failure
- Ensure the extension's plugin/dependency is declared on the buildscript classpath with a version compatible with your Jib plugin version
- Remove or disable the pluginExtension block to confirm it is the failing component, then fix or update the extension
Example fix
// before
jib { pluginExtensions { pluginExtension { implementation = 'com.example.OldExtension' } } } // incompatible version
// after
buildscript { dependencies { classpath('com.example:new-extension:2.0') } }
jib { pluginExtensions { pluginExtension { implementation = 'com.example.NewExtension' } } } Defensive patterns
Strategy: try-catch
Validate before calling
jib.pluginExtensions.each { ext ->
try { Class.forName(ext.implementation) } catch (ClassNotFoundException e) {
throw new GradleException("Extension class not on classpath: " + ext.implementation)
}
} Try / catch
try { jibBuild.run() } catch (GradleException e) { if (e.message.startsWith('error running extension')) { logger.error("Extension failed: " + e.message); e.cause?.printStackTrace() }; throw e } Prevention
- Run builds with --stacktrace to see the underlying extension cause
- Keep extension plugin versions compatible with your Jib plugin version
- Isolate extensions: build without them first to confirm the base build works
When it happens
Trigger: Configuring an extension via jibExtension in the plugin config whose plugin is not on the buildscript classpath, the extension class throws internally (e.g. cannot process the project), or the extension API version is incompatible with the Jib plugin version.
Common situations: Using jib { pluginExtensions { pluginExtension { implementation = 'com.example.MyExtension' } } } with a missing dependency, or a Jib extension plugin (like the spring-boot extension) failing on an unexpected project structure or after a Jib version upgrade.
Related errors
- error running extension '${extensionName}': ${ex.getMessage(
- container.appRoot is not an absolute Unix-style path: ${inva
- invalid value for containerizingMode: ${invalidContainerizin
- container.workingDirectory is not an absolute Unix-style pat
- from.platforms contains a platform configuration that is mis
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/45ae3b350f9be0e4.
Report an issue: GitHub.