[ https://issues.apache.org/jira/browse/SOLR-5088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13723586#comment-13723586 ]
Mikhail Khludnev commented on SOLR-5088: ---------------------------------------- still not clear how you run it. don't you put your classes as a lib in jetty? my only _guess_: your classes are located at some "bottom" classloader (and consequently it triggers loading solr classes), after that app/jetty loads solr classes in descended classloader, whether it jetty's web-apps classloader or SolrResourceLoader.classloader that breaks chain of classloader, that fails asSubclass. Please make sure that you follow instructions http://wiki.apache.org/solr/SolrPlugins#How_to_Load_Plugins > ClassCastException is thrown when trying to use custom SearchHandler. > --------------------------------------------------------------------- > > Key: SOLR-5088 > URL: https://issues.apache.org/jira/browse/SOLR-5088 > Project: Solr > Issue Type: Bug > Affects Versions: 4.4 > Reporter: Pavel Yaskevich > > Hi guys, > I'm trying to replace solr.SearchHandler to custom one in solrconfig.xml > for one of the stores, and it's throwing following exception: > {noformat} > Caused by: org.apache.solr.common.SolrException: RequestHandler init failure > at > org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:167) > at org.apache.solr.core.SolrCore.<init>(SolrCore.java:772) > ... 13 more > Caused by: org.apache.solr.common.SolrException: Error Instantiating Request > Handler, org.my.solr.index.CustomSearchHandler failed to instantiate > org.apache.solr.request.SolrRequestHandler > at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:551) > at org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:603) > at > org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:153) > ... 14 more > Caused by: java.lang.ClassCastException: class > org.my.solr.index.CustomSearchHandler > at java.lang.Class.asSubclass(Class.java:3116) > at > org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:433) > at > org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:381) > at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:530) > ... 16 more > {noformat} > I actually tried extending SearchHandler, and implementing SolrRequestHandler > as well as extending RequestHandlerBase and it's all the same > ClassCastException result... > org.my.solr.index.CustomSearchHandler is definitely in class path and > recompiled every retry. > Maybe I'm doing something terribly wrong? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org