Thanks Chris for a quick response.

But I verified that I only have the following jars
lucene-analyzers-common-4.5.1
lucene-core-4.5.1
lucene-queries-4.5.1
lucene-spatial-4.5.1 
solr-solrj-4.5.1

they are all the same version.

Also how can I verify the classpath ? 

Since I do not have other lucene/solr versions I assume it might just be fine.

--additional information 
also I have added a lib tag in my solrconfig.xml
 <lib dir="../../../lib" regex=".*\.jar" /> this points to the path where i 
have my jar that contains my PayloadSimilarity class
also I see in the logs that 
the file gets added to  org.apache.solr.core.SolrResourceLoader 


On Jan 27, 2014, at 5:32 PM, Chris Hostetter <hossman_luc...@fucit.org> wrote:

> 
> : Caused by: java.lang.ClassCastException: <mypackage>.PayloadSimilarity 
> : cannot be cast to org.apache.lucene.search.similarities.Similarity
> 
> If you are getting this error even though you subclass DefaultSimilarity, 
> i suspect that one or both of the following has happened:
> 
> 1) you've compiled your PayloadSimilarity against a different version of 
> solr the lucene/solr jars then what you are running with
> 2) you've got multiple versions of the lucene similarity jars in your 
> classpath at runtime.
> 
> 
> 
> -Hoss
> http://www.lucidworks.com/

Reply via email to