: SEVERE: java.lang.ClassCastException: : wrappt.solr.requesthandler.TopListRequestHandler cannot be cast to : org.apache.solr.request.SolrRequestHandler at : org.apache.solr.core.RequestHandlers$1.create(RequestHandlers.java:149)
: added this handler to a jar called: solrRequestHandler1.jar and added this : jar along with apache-solr-nightly.jar to the \lib directory of my server. : (It needs the last jar for resolving the StandardRequestHandler. Isnt this : strange btw, because I thought that it would be resolved from solr.war : automatically. ) classpaths are very very very tricky and anoying. i believe the problem you are seeing is that the SolrCore knows about the copy of StandardREquestHandler in the Classloader for your war, but because of where you put your custom request handler, the war's classloader is delegating "up" to it's parent (the containers class loader) to find it, at which point the containers class loader also needs to resolve StandardRequestHandler (hence you put apache-solr-nightly.jar in that lib so that classloader can find it) now the container classloader has resolved all of the classes it needs for Solr to finsh constructing your hanlder -- except that your handler doesn't extend the "copy" of StandardRequestHandler Solr knows about -- it extends one up in in the parent classloader. try creating a lib directory in your solrhome and putting your jar there ... make sure you get rid of your jar (and the solr-nightly jar) that you put in the containers main lib directory. they will cause you nothing but problems. if that *still* doesn't work, try unpacking the Solr war, and adding your class directly to it ... that *completeley* eliminates any possibility of classpath issues and will help identify if it's some other random problem (but it's a last resort since it makes upgrading later hard) http://wiki.apache.org/solr/SolrPlugins -Hoss