On 1/27/2014 5:41 PM, Summer Shire wrote:
Caused by: java.lang.ClassCastException: <mypackage>.PayloadSimilarity cannot 
be cast to org.apache.lucene.search.similarities.Similarity
        at 
org.apache.solr.schema.IndexSchema$1.getSimilarity(IndexSchema.java:929)
        at 
org.apache.solr.schema.IndexSchema.getSimilarity(IndexSchema.java:257)
        at 
org.apache.solr.update.SolrIndexConfig.toIndexWriterConfig(SolrIndexConfig.java:219)
        at 
org.apache.solr.update.SolrIndexWriter.<init>(SolrIndexWriter.java:77)
        at 
org.apache.solr.update.SolrIndexWriter.create(SolrIndexWriter.java:64)
        at 
org.apache.solr.update.DefaultSolrCoreState.createMainIndexWriter(DefaultSolrCoreState.java:267)
        at 
org.apache.solr.update.DefaultSolrCoreState.getIndexWriter(DefaultSolrCoreState.java:110)
        at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:1440)

I think there must be incorrect versions of jars in unexpected places, or you're not compiling against the same version of Solr jars as the version you're running, or perhaps theSolr install you've got has old versions of jars hanging around, either from an old extracted .war file or elsewhere on the classpath.

Here's an old thread:

http://lucene.472066.n3.nabble.com/Casting-Exception-with-Similarity-td475849.html

Thanks,
Shawn

Reply via email to