Pierre Salagnac created SOLR-17377: -------------------------------------- Summary: ClusterSingleton defined in solr.xml cannot be loaded from a module Key: SOLR-17377 URL: https://issues.apache.org/jira/browse/SOLR-17377 Project: Solr Issue Type: Bug Security Level: Public (Default Security Level. Issues are Public) Affects Versions: 9.6, 9.5 Reporter: Pierre Salagnac
Following SOLR-17096, we can declare a custom cluster singleton in {{solr.xml}} file. There is an early check in class {{SolrXmlConfig}} to ensure the plugin actually implements interface {{{}ClusterSingleton{}}}. This check is broken for modules and fails for any class which is defined as an external plugin, and not in the Solr code itself because of a {{{}ClassNotFoundException{}}}. My understanding is at this point, we don't have the _extended_ class loader that includes plugins yet. {code:java} org.apache.solr.common.SolrException: Error loading class 'my.package.MyClass' at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:550) at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:471) at org.apache.solr.core.SolrXmlConfig.lambda$getClusterSingletonPluginInfos$10(Unknown Source) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) at org.apache.solr.core.SolrXmlConfig.getClusterSingletonPluginInfos(SolrXmlConfig.java:714) at org.apache.solr.core.SolrXmlConfig.getClusterPlugins(SolrXmlConfig.java:668) ........... Caused by: java.lang.ClassNotFoundException: my.package.MyClass at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589) {code} With the code commented, the singleton is loaded with no error later. The issue is only with this early check itself, and not when instantiating and starting the singleton. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org