Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
9.5, 9.6
-
None
-
None
-
None
Description
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.
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)
With the code of the check 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.
Attachments
Issue Links
- is caused by
-
SOLR-17096 Support for Cluster Singleton plugins in solr.xml
- Closed