lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@odoko.co.uk>
Subject Re: Google didn't help on this one!
Date Wed, 16 Sep 2015 11:32:46 GMT
See this:

Caused by: java.lang.ClassCastException: java.lang.Float cannot be cast 
to java.lang.String
     at 
org.apache.solr.spelling.AbstractLuceneSpellChecker.init(AbstractLuceneSpellChecker.java:97)

AbstractLuceneSpellChecker is expecting a string, but getting a float.
Can you paste here the config (in solrconfig.xml) for your spellchecker?

Also, a simple way to get spell checking started is to look at the
/browse example that comes with the techproducts sample configs. It has
spellchecking already working, so starting there can be a way to get
something going easily.

Upayavira

On Wed, Sep 16, 2015, at 12:22 PM, Mark Fenbers wrote:
> On 9/15/2015 6:49 PM, Shawn Heisey wrote:
> >
> > >From the information we have, we cannot tell if this is a problem
> > request or not.  Do you have a core/collection named "EventLog" on your
> > Solr server?  It will be case sensitive.  If you do, does that config
> > have a handler named "spellCheckCompRH" in it (also case sensitive)?
> >
> > The nc output lets us see everything that your client sent to Solr, so I
> > have built a test URL for you based on that info.
> >
> > Try sending the following URL from a browser or a curl command.  If I've
> > gotten the host wrong, go ahead and replace it with the correct value.
> > You'll probably be able to see any errors right in the browser or curl
> > output.  Hopefully this will help you figure out what's happening.  Also
> > look in your Solr server's logfile for error messages.
> >
> > http://dell9-tir:8983/solr/EventLog/spellCheckCompRH?qt=%2FspellCheckCompRH&q=Some+more+text+wit+some+missspelled+wordz.&spellcheck=on&spellcheck.build=true&wt=json&indent=true
> >
> > I notice that you have "spellcheck.build=true" in that URL.  You
> > probably don't want to do this on every request, assuming that your
> > spellcheck dictionary even requires building.
> >
> > Thanks,
> > Shawn
> It wasn't really a problem request, but a follow-up to those who took 
> the time to help me.  However, since this error has returned, it is now 
> a problem request!  ;-)
> 
> I am aware that "spellcheck.build=true" is expensive, but since I 
> haven't had my first success yet with spell-checking, I figured it 
> wouldn't hurt to have it in there for now.
> 
> I ran the URL you gave verbatim (because your assumptions were correct), 
> but I got the stacktrace shown below.  This is particularly puzzling 
> because I can find nowhere in my code or configuration where I am 
> specifying a float value where I shouldn't be.  My solrconfig.xml and 
> schema.xml are posted in another thread having a subject "Moving on to 
> spelling" if that helps you help me.
> 
> Thanks,
> Mark
> 
> HTTP ERROR 500
> 
> Problem accessing /solr/EventLog/spellCheckCompRH. Reason:
> 
>      {msg=SolrCore 'EventLog' is not available due to init failure: 
> java.lang.Float cannot be cast to 
> java.lang.String,trace=org.apache.solr.common.SolrException: SolrCore 
> 'EventLog' is not available due to init failure: java.lang.Float cannot 
> be cast to java.lang.String
>      at
>      org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:978)
>      at org.apache.solr.servlet.HttpSolrCall.init(HttpSolrCall.java:250)
>      at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:417)
>      at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:210)
>      at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:179)
>      at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
>      at 
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
>      at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>      at 
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
>      at 
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
>      at 
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
>      at 
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
>      at 
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>      at 
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
>      at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>      at 
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
>      at 
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
>      at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
>      at org.eclipse.jetty.server.Server.handle(Server.java:499)
>      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
>      at 
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
>      at 
> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
>      at 
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
>      at 
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
>      at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.solr.common.SolrException: java.lang.Float cannot 
> be cast to java.lang.String
>      at org.apache.solr.core.SolrCore.<init>(SolrCore.java:820)
>      at org.apache.solr.core.SolrCore.<init>(SolrCore.java:659)
>      at org.apache.solr.core.CoreContainer.create(CoreContainer.java:727)
>      at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:447)
>      at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:438)
>      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>      at 
> org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$1.run(ExecutorUtil.java:210)
>      at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>      at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>      ... 1 more
> Caused by: java.lang.ClassCastException: java.lang.Float cannot be cast 
> to java.lang.String
>      at 
> org.apache.solr.spelling.AbstractLuceneSpellChecker.init(AbstractLuceneSpellChecker.java:97)
>      at 
> org.apache.solr.spelling.IndexBasedSpellChecker.init(IndexBasedSpellChecker.java:57)
>      at 
> org.apache.solr.handler.component.SpellCheckComponent.inform(SpellCheckComponent.java:660)
>      at 
> org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:619)
>      at org.apache.solr.core.SolrCore.<init>(SolrCore.java:800)
>      ... 9 more
> ,code=500}
> 

Mime
View raw message