{"record":{"id":"a08b7f31c82a0b30","repo":"spinnaker/spinnaker","slug":"could-not-find-system-extension-class-s","errorCode":null,"errorMessage":"Could not find system extension class '%s'","messagePattern":"Could not find system extension class '(.+?)'","errorType":"exception","errorClass":"IntegrationException","httpStatus":null,"severity":"critical","filePath":"kork/kork-plugins/src/main/kotlin/com/netflix/spinnaker/kork/plugins/ExtensionBeanDefinitionRegistryPostProcessor.kt","lineNumber":86,"sourceCode":"\n    pluginManager.startedPlugins.forEach { pluginWrapper ->\n      val p = pluginWrapper.plugin\n      if (p is PrivilegedSpringPlugin) {\n        p.registerBeanDefinitions(registry)\n      }\n    }\n\n    log.debug(\"Finished preparing plugins in {}ms\", System.currentTimeMillis() - start)\n  }\n\n  override fun postProcessBeanFactory(beanFactory: ConfigurableListableBeanFactory) {\n    pluginManager.getExtensionClassNames(null).forEach {\n      log.debug(\"Creating extension '{}'\", it)\n\n      val extensionClass = try {\n        javaClass.classLoader.loadClass(it)\n      } catch (e: ClassNotFoundException) {\n        throw IntegrationException(\"Could not find system extension class '$it'\", e)\n      }\n\n      val bean = pluginManager.extensionFactory.create(extensionClass)\n      val beanName = \"${extensionClass.simpleName.replaceFirstChar { it.lowercase() }}SystemExtension\"\n\n      beanFactory.registerSingleton(beanName, bean)\n\n      applicationEventPublisher.publishEvent(ExtensionLoaded(this, beanName, extensionClass))\n    }\n\n    pluginManager.startedPlugins.forEach { plugin ->\n      if (plugin.isUnsafe()) return@forEach\n      log.debug(\"Creating extensions for plugin '{}'\", plugin.pluginId)\n\n      val pluginExtensions = pluginManager.getExtensionClassNames(plugin.pluginId)\n      if (pluginExtensions.isNullOrEmpty()) log.warn(\"No extensions found for plugin '{}'\", plugin.pluginId)\n\n      pluginExtensions.forEach {","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/spinnaker/spinnaker/blob/1d4a5d0f6d10d0232b1af077decd559b68a94a5e/kork/kork-plugins/src/main/kotlin/com/netflix/spinnaker/kork/plugins/ExtensionBeanDefinitionRegistryPostProcessor.kt#L68-L104","documentation":"During Spring context startup, ExtensionBeanDefinitionRegistryPostProcessor.postProcessBeanFactory registers Spinnaker system extensions declared by installed plugins. It loads each declared extension class by name through the application classloader; if the class is not on the classpath it throws this IntegrationException, failing the application boot. The declared extension is a system-level extension, so it must be visible to the host application, not only inside a plugin.","triggerScenarios":"Application startup when a plugin's plugin descriptor declares a system extension whose class is not loadable by the application classloader — e.g. the extension class lives in the plugin jar only, the plugin id/class name is mistyped, or the plugin jar version that provided the class is no longer present.","commonSituations":"Plugin lists an extension in its plugin.properties that was removed or renamed in a newer version; extension class packaged in the plugin rather than a shared dependency; stale plugin cache after upgrading Spinnaker.","solutions":["Fix the extension class name declared in the plugin descriptor (plugin.properties) so it matches a class loadable by the application classloader","Ensure the class is packaged in a jar on the Spinnaker service classpath, not only inside the plugin","Clear the plugins download/cache directory and redeploy the correct plugin version"],"exampleFix":"// plugin.properties\n// before: spinnaker.ext.class=com.example.RenamedSystemExtension\n// after: spinnaker.ext.class=com.example.MySystemExtension","handlingStrategy":"validation","validationCode":"String cls = extensionClassName;\ntry { javaClass.classLoader.loadClass(cls); } catch (ClassNotFoundException e) { log.error(\"System extension {} missing from app classpath\", cls); }","typeGuard":null,"tryCatchPattern":"try { runSpringContext(); } catch (IntegrationException e) { if (e.getMessage().startsWith(\"Could not find system extension class\")) { log.error(\"Remove/fix plugin declaring missing system extension\", e); } throw e; }","preventionTips":["Keep the extension class name in plugin.properties in sync with the packaged class","Package shared system extensions on the host classpath, not only inside the plugin jar","Clear the plugin cache and verify plugin versions after Spinnaker upgrades"],"tags":["plugins","spring","classpath","startup"],"backgroundTag":"class-not-found","analyzedSha":"1d4a5d0f6d10d0232b1af077decd559b68a94a5e","analyzedAt":"2026-09-10T14:13:07.222Z","contentChangedAt":"2026-09-10T14:13:07.222Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}