Need some help. I have a Kotlin based plugin for ...
# announcements
a
Need some help. I have a Kotlin based plugin for Solr. When I run Solr embedded (via solr-undertow) where my plugin classes are on the classpath of the whole process and therefore in the system classloader, everything is fine. If I add the JARS dynamically myself to the classloader used for Solr-undertow that includes where it adds the jars for Solr, it fails. If I let Solr add the JARS in the way it always does for any other plugin, it fails. Basically I always end up with:
Copy code
Caused by: java.lang.NoSuchFieldError: INSTANCE
	at com.renlearn.solr.plugins.blacklist.BlacklistPostFilterQParserPlugin.<init>(BlacklistPostFilterQParserPlugin.kt:43) ~[na:na]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_60]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_60]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_60]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[na:1.8.0_60]
	at java.lang.Class.newInstance(Class.java:442) ~[na:1.8.0_60]
	at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:529) ~[solr-core-4.10.4.jar:4.10.4 1662817 - mike - 2015-02-27 16:43:07]
	at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:517) ~[solr-core-4.10.4.jar:4.10.4 1662817 - mike - 2015-02-27 16:43:07]