Hi, I (and apparently others) have noticed a rather strange and seemingly intermittent ClassCastException in facet caching when using join (SOLR-2272) and sometimes pivot as well.
A similar discussion from others noticing this can be found here: http://www.lucidimagination.com/search/document/30c0029a7eb194c4/are_there_any_restrictions_on_what_kind_of_how_many_fields_you_can_use_in_pivot_query_i_get_classca#7ef18fd2add7ee5c Errors/stack trace for the exception included below. Solr Version: This is seen intermittently on trunk + SOLR-2272. >From initial testing, maybe this is an escaping/tokenizing issue? If I have facet values that include a '-' in the string, the exception is thrown. Strangely, it seems to show up in other scenarios, but maybe under the covers there are non-alphanum and/or special chars ending up in facet parameters. I'm not very familiar with the join and/or pivot code (but wow they are great additions!) -- perhaps someone with more knowledge in this area can chime in? Many thanks, Peter Here's a sample query that generates an error: http://127.0.0.1:9000/solr/select?q=*:*&fq={!join from=customer_number to=customer_number}customer_name:onlineltd N.B. Both the customer_number and customer_name fields have some [but not all] values that contain '-', whitespace, and other non-alphanum chars. The last 'onlineltd' can be any value to produce the exception. Also, the server log shows this exception is thrown twice in quick succession. Error messages: Excerpt just before stack trace from the server log: 07-Mar-2011 20:40:08 org.apache.solr.core.SolrCore execute INFO: [] webapp=/solr path=/select params={fq={!join+from%3Dcustomer_number+to%3 Dcustomer_number}customer_name:*ltd*&q=*:*&rows=0} status=500 QTime=34 07-Mar-2011 20:40:08 org.apache.solr.common.SolrException log SEVERE: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lorg.apache.solr.common.util.ConcurrentLRUCache$CacheEntry; And here's the client side http trace: HTTP ERROR 500 Problem accessing /solr/select. Reason: [Ljava.lang.Object; cannot be cast to [Lorg.apache.solr.common.util.ConcurrentLRUCache$CacheEntry; java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lorg.apache.solr.common.util.ConcurrentLRUCache$CacheEntry; at org.apache.solr.common.util.ConcurrentLRUCache$PQueue.myInsertWithOverflow(ConcurrentLRUCache.java:377) at org.apache.solr.common.util.ConcurrentLRUCache.markAndSweep(ConcurrentLRUCache.java:329) at org.apache.solr.common.util.ConcurrentLRUCache.put(ConcurrentLRUCache.java:144) at org.apache.solr.search.FastLRUCache.put(FastLRUCache.java:131) at org.apache.solr.search.SolrIndexSearcher.getDocSet(SolrIndexSearcher.java:809) at org.apache.solr.search.JoinQuery$JoinQueryWeight.getDocSet(JoinQParserPlugin.java:256) at org.apache.solr.search.JoinQuery$JoinQueryWeight.scorer(JoinQParserPlugin.java:139) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:536) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:303) at org.apache.solr.search.SolrIndexSearcher.getDocSetNC(SolrIndexSearcher.java:849) at org.apache.solr.search.SolrIndexSearcher.getDocSet(SolrIndexSearcher.java:568) at org.apache.solr.search.SolrIndexSearcher.getDocSet(SolrIndexSearcher.java:603) at org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1088) at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1069) at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:337) at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:431) at org.apache.solr.handler.component.SearchHandler.handleSingleQuery(SearchHandler.java:304) at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:261) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1298) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:341) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
