{"record":{"id":"45ae3b350f9be0e4","repo":"GoogleContainerTools/jib","slug":"error-running-extension-extensionclassname","errorCode":null,"errorMessage":"error running extension '${extensionClassName}': ${message}","messagePattern":"error running extension '(.+?)': (.+?)","errorType":"exception","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildDockerTask.java","lineNumber":171,"sourceCode":"\n    } catch (InvalidFilesModificationTimeException ex) {\n      throw new GradleException(\n          \"container.filesModificationTime should be an ISO 8601 date-time (see \"\n              + \"DateTimeFormatter.ISO_DATE_TIME) or special keyword \\\"EPOCH_PLUS_SECOND\\\": \"\n              + ex.getInvalidFilesModificationTime(),\n          ex);\n\n    } catch (InvalidCreationTimeException ex) {\n      throw new GradleException(\n          \"container.creationTime should be an ISO 8601 date-time (see \"\n              + \"DateTimeFormatter.ISO_DATE_TIME) or a special keyword (\\\"EPOCH\\\", \"\n              + \"\\\"USE_CURRENT_TIMESTAMP\\\"): \"\n              + ex.getInvalidCreationTime(),\n          ex);\n\n    } catch (JibPluginExtensionException ex) {\n      String extensionName = ex.getExtensionClass().getName();\n      throw new GradleException(\n          \"error running extension '\" + extensionName + \"': \" + ex.getMessage(), ex);\n\n    } catch (IncompatibleBaseImageJavaVersionException ex) {\n      throw new GradleException(\n          HelpfulSuggestions.forIncompatibleBaseImageJavaVersionForGradle(\n              ex.getBaseImageMajorJavaVersion(), ex.getProjectMajorJavaVersion()),\n          ex);\n\n    } catch (InvalidImageReferenceException ex) {\n      throw new GradleException(\n          HelpfulSuggestions.forInvalidImageReference(ex.getInvalidReference()), ex);\n\n    } catch (ExtraDirectoryNotFoundException ex) {\n      throw new GradleException(\n          \"extraDirectories.paths contain \\\"from\\\" directory that doesn't exist locally: \"\n              + ex.getPath(),\n          ex);\n    } finally {","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildDockerTask.java#L153-L189","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\njib { pluginExtensions { pluginExtension { implementation = 'com.example.OldExtension' } } } // incompatible version\n// after\nbuildscript { dependencies { classpath('com.example:new-extension:2.0') } }\njib { pluginExtensions { pluginExtension { implementation = 'com.example.NewExtension' } } }","handlingStrategy":"try-catch","validationCode":"jib.pluginExtensions.each { ext ->\n  try { Class.forName(ext.implementation) } catch (ClassNotFoundException e) {\n    throw new GradleException(\"Extension class not on classpath: \" + ext.implementation)\n  }\n}","typeGuard":null,"tryCatchPattern":"try { jibBuild.run() } catch (GradleException e) { if (e.message.startsWith('error running extension')) { logger.error(\"Extension failed: \" + e.message); e.cause?.printStackTrace() }; throw e }","preventionTips":["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"],"tags":["gradle","jib","extension","plugin"],"backgroundTag":"upstream-api-error","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"}