lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <j...@basetechnology.com>
Subject Re: Solr 4.7.2 ValueSourceParser classCast exception
Date Fri, 23 May 2014 20:27:57 GMT
Are you sure that you compiled your code with the proper Solr jars so that 
the class signature (extends, implements, and constructors) matches the Solr 
4.7.2 jars? I mean, Java is simply complaining that your class is not a 
valid value source class of the specified type.

-- Jack Krupansky

-----Original Message----- 
From: Summer Shire
Sent: Friday, May 23, 2014 12:40 PM
To: solr-user@lucene.apache.org
Subject: Solr 4.7.2 ValueSourceParser classCast exception

Hi All,

I have my own popularity value source class
and I let solr know about it via solrconfig.xml


<valueSourceParser name="popularity" 
class="mysolr.sources.PopValueSourceParser" />

But then I get the following class cast exception

I have tried to make sure there are no old Solr jar files in the classpath.

Why would this be happening ?

I even tried to use the lib tag to hard code the solr and solrj jars for 
4.7.2

org.apache.solr.common.SolrException: Error Instantiating ValueSourceParser, 
mysolr.sources.PopValueSourceParser failed to instantiate 
org.apache.solr.search.ValueSourceParser
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:844)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:630)
at 
org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:562)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:597)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:258)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:250)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: org.apache.solr.common.SolrException: Error Instantiating 
ValueSourceParser, mysolr.sources.PopValueSourceParser failed to instantiate 
org.apache.solr.search.ValueSourceParser
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:552)
at org.apache.solr.core.SolrCore.createInitInstance(SolrCore.java:587)
at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:2191)
at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:2185)
at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:2218)
at org.apache.solr.core.SolrCore.initValueSourceParsers(SolrCore.java:2130)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:765)
... 13 more
Caused by: java.lang.ClassCastException: class 
mysolr.sources.PopValueSourceParser
at java.lang.Class.asSubclass(Class.java:3018)
at 
org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:454)
at 
org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:401)
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:531)
... 19 more
MySolr[46778:5844 0] 2014/05/22 15:47:28 717.16 MB/4.09 GB ERROR 
org.apache.solr.core.CoreContainer    - 
null:org.apache.solr.common.SolrException: Unable to create core: core1
at org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:989)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:606)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:258)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:250)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)


Thanks,
Summer 


Mime
View raw message