Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DED06E0D1 for ; Wed, 28 Nov 2012 01:59:45 +0000 (UTC) Received: (qmail 720 invoked by uid 500); 28 Nov 2012 01:59:42 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 665 invoked by uid 500); 28 Nov 2012 01:59:42 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 656 invoked by uid 99); 28 Nov 2012 01:59:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2012 01:59:42 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of arafalov@gmail.com designates 209.85.220.48 as permitted sender) Received: from [209.85.220.48] (HELO mail-pa0-f48.google.com) (209.85.220.48) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2012 01:59:38 +0000 Received: by mail-pa0-f48.google.com with SMTP id fa1so4264003pad.35 for ; Tue, 27 Nov 2012 17:59:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=mGg0KkIJWrqCmRp2KViTkE2XvP+ugzfSsRQJNRKxm0k=; b=A7v57jgcK8w8bfp3Ff+huarXUZZX27JH1pHSXKNx49trTSWfKeRuu35YrB/MvHBESE sgKS2rg7/C9zo6ERZehhfMfP/lWFCUKPfXolE1vQ9WqqxGEJuENxYs+S6Fs05Vm0s30q 3K+1vC6WcboCBOlzQonoGqyedH5pD1mJHQ/6crGMm2w003ilf2BmgTru9ZYVohY7Qgey VI0/F9+IfjGTEv1Ko+b11bAZtxCkWQ7VeSja4NoupXHL7Ah75exS8xiRdE4l01yoVKJm qF52HWstoXj01UN3/jBPwIvlKDIb0E6Z1B1SPjt76RJrQms6Oa2jqPvZWmGkXM9JsZr9 7FKw== Received: by 10.66.86.101 with SMTP id o5mr48142685paz.15.1354067957732; Tue, 27 Nov 2012 17:59:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.50.99 with HTTP; Tue, 27 Nov 2012 17:58:37 -0800 (PST) In-Reply-To: References: From: Alexandre Rafalovitch Date: Tue, 27 Nov 2012 20:58:37 -0500 Message-ID: Subject: Re: Odd casting error in embedded Jetty container To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=f46d042de8079f56cf04cf848304 X-Virus-Checked: Checked by ClamAV on apache.org --f46d042de8079f56cf04cf848304 Content-Type: text/plain; charset=UTF-8 Are you sure that NamedSPILoader respects -verbose flag? I would still check the filesystem access using something that does not lie (see my old email). Regards, Alex. Personal blog: http://blog.outerthoughts.com/ LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch - Time is the quality of nature that keeps events from happening all at once. Lately, it doesn't seem to be working. (Anonymous - via GTD book) On Tue, Nov 27, 2012 at 4:49 PM, Mark Bennett wrote: > Hi Alex and Erick, > > I added -verbose which shows every class load. > > From the 12,000+ lines of output, I only see 4.0.0 jars, wrt lucene and > solr. > > lucene-analyzers-common-4.0.0.jar from 2 places: > > /Users/username/.m2/repository/org/apache/lucene/lucene-analyzers-common/4.0.0 > > /Users/username/project/branch/workspace/Project/solr-webapp/webapp/WEB-INF/lib/ > > lucene-core-4.0.0.jar from 2 places: .m2 and WEB-INF/lib > > SolrJ is a bit interesting: > > file:/Users/username/.m2/repository/org/apache/solr/solr-solrj/4.0.0/solr-solrj-4.0.0.jar > > file:/Users/username/project/workspace/Project/solr-webapp/webapp/WEB-INF/lib/ > *apache*-solr-solrj-4.0.0.jar > Notice the different spelling, the "apache-" prefix on the latter. > > apache-solr-core-4.0.0.jar just from WEB-INF/lib > > lucene-analyzers-kuromoji-4.0.0.jar and lucene-analyzers-smartcn-4.0.0.jar > only from .m2 > > lucene-test-framework-4.0.0.jar only from .m2 > > > > > On Tue, Nov 27, 2012 at 6:04 AM, Alexandre Rafalovitch > wrote: > > > I find it is best to troubleshoot path problems backwards. Run something > > that logs every file access (SysInternal's Process Monitor on Windows, > > truss/struss on *nix/Mac systems) and then grep for jars. You will see > > exactly which jars are loaded from where and also which other jars the > same > > process looked for just before/after. That often can give you a hint of > > where the requests are coming from. This method has a bit of a learning > > curve the first time, but the time investment pays off really fast. > > > > Shameless plus for - an old but still valid - presentation of mine on > this: > > http://www.infoq.com/presentations/maintaining-production-java-apps > > > > Regards, > > Alex. > > > > Personal blog: http://blog.outerthoughts.com/ > > LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch > > - Time is the quality of nature that keeps events from happening all at > > once. Lately, it doesn't seem to be working. (Anonymous - via GTD book) > > > > > > On Tue, Nov 27, 2012 at 7:42 AM, Erick Erickson > >wrote: > > > > > Sure looks like you're mixing up jars from old and new Solrs somehow. > > > You've > > > stripped down the classpath, but what about the solr libraries? All the > > > things that > > > can be defined in directives in solrconfig.xml? > > > > > > Not much help I know, but the best I can think of. > > > Erick > > > > > > > > > On Mon, Nov 26, 2012 at 7:38 PM, Mark Bennett > > > wrote: > > > > > > > I'm sure this is some config error, but I've checked a lot of things > > and > > > > not finding much on Google. Not sure if it's a jvm, maven, jetty or > > solr > > > > config issue. > > > > > > > > I'm running with a custom Solr 4.0.0 app under Jetty 8.1.2, with a > > clone > > > of > > > > the example directory tree. > > > > > > > > The main error seems to be: > > > > java.lang.ClassCastException: class > > > > > org.apache.lucene.codecs.mockintblock.*MockFixedIntBlockPostingsFormat* > > > > ... > > > > at org.apache.lucene.util.NamedSPILoader.(*NamedSPILoader* > > > > .java:37) > > > > at > > org.apache.lucene.codecs.PostingsFormat.(*PostingsFormat* > > > > .java:44) > > > > > > > > I've added jars to the class path, and iteratively stripped down my > > > configs > > > > to the bare essentials. > > > > > > > > It's odd that it talks about a Mock class as I'd normally associate > > that > > > > with unit tests; presumably that's part of the Service Loader > > mechanism. > > > > > > > > Error logs: > > > > WARNING: FAILED SolrRequestFilter: > > java.lang.ExceptionInInitializerError > > > > java.lang.ExceptionInInitializerError > > > > at > > > > > > > > > > > > > > org.apache.solr.core.SolrResourceLoader.reloadLuceneSPI(SolrResourceLoader.java:179) > > > > at > > > > > > > > > > org.apache.solr.core.SolrResourceLoader.(SolrResourceLoader.java:113) > > > > at > > > > > > > > > > org.apache.solr.core.SolrResourceLoader.(SolrResourceLoader.java:228) > > > > at org.apache.solr.core.Config.(Config.java:94) > > > > at org.apache.solr.core.Config.(Config.java:73) > > > > at > > > > > > > > > > > > > > org.apache.solr.servlet.SolrDispatchFilter.(SolrDispatchFilter.java:91) > > > > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > > > Method) > > > > at > > > > > > > > > > > > > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > > > > at > > > > > > > > > > > > > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > > > > at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > > > at java.lang.Class.newInstance0(Class.java:355) > > > > at java.lang.Class.newInstance(Class.java:308) > > > > at > > > > > > > > > > > > > > org.eclipse.jetty.servlet.ServletContextHandler$Context.createFilter(ServletContextHandler.java:951) > > > > ... > > > > Caused by: java.lang.ClassCastException: class > > > > org.apache.lucene.codecs.mockintblock.MockFixedIntBlockPostingsFormat > > > > at java.lang.Class.asSubclass(Class.java:3018) > > > > at > > > > > org.apache.lucene.util.SPIClassIterator.next(SPIClassIterator.java:126) > > > > at > > > org.apache.lucene.util.NamedSPILoader.reload(NamedSPILoader.java:60) > > > > at > > > org.apache.lucene.util.NamedSPILoader.(NamedSPILoader.java:42) > > > > at > > > org.apache.lucene.util.NamedSPILoader.(NamedSPILoader.java:37) > > > > at > > > > > > org.apache.lucene.codecs.PostingsFormat.(PostingsFormat.java:44) > > > > ... 56 more > > > > > > > > Later I see: > > > > WARNING: FAILED > > > > > > > > > > > > > > o.e.j.w.WebAppContext{/solr,file:.../},target/classes/jettyhome/webapps/solr.war: > > > > java.lang.ExceptionInInitializerError > > > > java.lang.ExceptionInInitializerError > > > > at > > > > > > > > > > > > > > org.apache.solr.core.SolrResourceLoader.reloadLuceneSPI(SolrResourceLoader.java:179) > > > > at > > > > > > > > > > org.apache.solr.core.SolrResourceLoader.(SolrResourceLoader.java:113) > > > > at > > > > > > > > > > org.apache.solr.core.SolrResourceLoader.(SolrResourceLoader.java:228) > > > > at org.apache.solr.core.Config.(Config.java:94) > > > > at org.apache.solr.core.Config.(Config.java:73) > > > > at > > > > > > > > > > > > > > org.apache.solr.servlet.SolrDispatchFilter.(SolrDispatchFilter.java:91) > > > > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > > > Method) > > > > at > > > > > > > > > > > > > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > > > > at > > > > > > > > > > > > > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > > > > at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > > > at java.lang.Class.newInstance0(Class.java:355) > > > > at java.lang.Class.newInstance(Class.java:308) > > > > at > > > > > > > > > > > > > > org.eclipse.jetty.servlet.ServletContextHandler$Context.createFilter(ServletContextHandler.java:951) > > > > > > > > > > > > -- > > > > Mark Bennett / New Idea Engineering, Inc. / mbennett@ideaeng.com > > > > Direct: 408-733-0387 / Main: 866-IDEA-ENG / Cell: 408-829-6513 > > > > > > > > > > --f46d042de8079f56cf04cf848304--