{"record":{"id":"82da053e82e2dc37","repo":"SonarSource/sonarqube","slug":"plugin-is-ignored-because-entry-point-clas","errorCode":null,"errorMessage":"Plugin {} [{}] is ignored because entry point class is not defined","messagePattern":"Plugin (.+?) \\[(.+?)\\] is ignored because entry point class is not defined","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginJarLoader.java","lineNumber":209,"sourceCode":"      .toList();\n\n    if (!incompatiblePlugins.isEmpty()) {\n      logGenericPluginLoadErrorLog();\n      throw MessageException.of(String.format(\"The following %s no longer compatible with this version of SonarQube: %s\",\n        incompatiblePlugins.size() > 1 ? \"plugins are\" : \"plugin is\", String.join(\", \", incompatiblePlugins)));\n    }\n  }\n\n  private boolean checkPluginInfo(PluginInfo info) {\n    String pluginKey = info.getKey();\n    if (blacklistedPluginKeys.contains(pluginKey)) {\n      LOG.warn(\"Plugin {} [{}] is blacklisted and is being uninstalled\", info.getName(), pluginKey);\n      deleteQuietly(info.getNonNullJarFile());\n      return false;\n    }\n\n    if (Strings.isNullOrEmpty(info.getMainClass()) && Strings.isNullOrEmpty(info.getBasePlugin())) {\n      LOG.warn(\"Plugin {} [{}] is ignored because entry point class is not defined\", info.getName(), info.getKey());\n      return false;\n    }\n\n    if (!info.isCompatibleWith(sonarRuntime.getApiVersion().toString())) {\n      throw MessageException.of(format(\"Plugin %s [%s] requires at least Sonar Plugin API version %s (current: %s)\",\n        info.getName(), info.getKey(), info.getMinimalSonarPluginApiVersion(), sonarRuntime.getApiVersion()));\n    }\n    return true;\n  }\n\n  private static Collection<File> listJarFiles(File dir) {\n    if (dir.exists()) {\n      return FileUtils.listFiles(dir, new String[] {\"jar\"}, false);\n    }\n    return Collections.emptyList();\n  }\n\n}","sourceCodeStart":191,"sourceCodeEnd":227,"githubUrl":"https://github.com/SonarSource/sonarqube/blob/184c821202192afc1c599fc912d0889b69fffa53/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginJarLoader.java#L191-L227","documentation":"PluginJarLoader skips any plugin JAR that defines neither a main entry-point class (Main-Class style attribute) nor a basePlugin it extends. Such a JAR is not a loadable SonarQube plugin, so the loader logs this warning and ignores the file.","triggerScenarios":"Server startup when a JAR in the plugins directory has both info.getMainClass() and info.getBasePlugin() null/empty (Strings.isNullOrEmpty), causing checkPluginInfo to return false and skip the JAR.","commonSituations":"Accidentally dropping a plain library JAR (dependency JAR) into extensions/plugins; a corrupted or mis-packaged plugin missing its Plugin class manifest entry.","solutions":["Remove the non-plugin JAR from extensions/plugins; if it is a shared library, place it in the plugin's lib directory or bundle it inside the plugin.","Rebuild/re-download the plugin from an official release so it includes the correct manifest entry point.","Verify with `jar tf plugin.jar` and the manifest that the Plugin-Class/main class attribute is present."],"exampleFix":"// before (wrong packaging)\nlib/my-utils.jar -> extensions/plugins/my-utils.jar\n// after\nextensions/plugins/my-plugin.jar (with sonar-plugin manifest entry point)\nlib/my-utils.jar kept as plugin dependency inside my-plugin.jar","handlingStrategy":"validation","validationCode":"// verify a jar is a valid sonar plugin before copying to extensions/plugins\nunzip -p plugin.jar META-INF/MANIFEST.MF | grep -E 'Plugin-Class|Sonar-Plugin'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only place official plugin artifacts in extensions/plugins, never bare dependency jars","Validate plugin packaging (manifest entry point) before deployment","Re-download plugins from official releases rather than copying from old servers"],"tags":["sonarqube","plugins","packaging","startup"],"backgroundTag":"missing-required-argument","analyzedSha":"184c821202192afc1c599fc912d0889b69fffa53","analyzedAt":"2026-09-09T12:23:51.573Z","contentChangedAt":"2026-09-09T12:23:51.573Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}