Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 65B3C10F35 for ; Wed, 10 Apr 2013 03:26:40 +0000 (UTC) Received: (qmail 21902 invoked by uid 500); 10 Apr 2013 03:26:38 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 21551 invoked by uid 500); 10 Apr 2013 03:26:32 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 21489 invoked by uid 99); 10 Apr 2013 03:26:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Apr 2013 03:26:29 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 209.85.214.49 is neither permitted nor denied by domain of manivannan@unmetric.com) Received: from [209.85.214.49] (HELO mail-bk0-f49.google.com) (209.85.214.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Apr 2013 03:26:25 +0000 Received: by mail-bk0-f49.google.com with SMTP id w12so5904bku.8 for ; Tue, 09 Apr 2013 20:26:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type:x-gm-message-state; bh=w5iql7wHU0056e8Snl8geLj+PGWbdk2JHSReNLrerJs=; b=ZxVVVpoKaUnkaMt5wtd+xNqExhXK7AHx25sVTQdoblUKbXFdYu1Ul4fUzcs6YOYLVF DU2qeiwwruOcwybOsIF98tl2mStkVJ6gL3NtLjRAz2LdXrNAXDEeI11kowzjtoh8ZZl1 XndBX/5rBEpqzuDoDVbfpfkzxL1CAIqLAYciJ4C+K9l2LBAbOBsOcLYPLh4reAjtDdQ2 khNy2SLRRHU1c5zRuHJEjFwUkV8cqAmes6CiQQ9d8kBn9sU3ltoHO/kYLEqYl66iEiBF qckeOZGCG5eC9e3lB3YnjyT8gOARSJaG9a04WPXY+HYCwdnVXEtuCZ/2CZOw/5oIEc0C yEVQ== X-Received: by 10.205.119.19 with SMTP id fs19mr55704bkc.105.1365564363411; Tue, 09 Apr 2013 20:26:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.16.193 with HTTP; Tue, 9 Apr 2013 20:25:43 -0700 (PDT) In-Reply-To: <00f201ce351e$61226c60$23674520$@thetaphi.de> References: <00d501ce350b$e6c5fb10$b451f130$@thetaphi.de> <00dc01ce350e$4a4170a0$dec451e0$@thetaphi.de> <00f201ce351e$61226c60$23674520$@thetaphi.de> From: Manivannan Selvadurai Date: Wed, 10 Apr 2013 08:55:43 +0530 Message-ID: Subject: Re: Cannot instantiate SPI class: org.apache.lucene.codecs.lucene42.Lucene42Codec To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=0015173fedfaccdcc804d9f93a43 X-Gm-Message-State: ALoCoQkHsoB8EeBWopyjDdVu9kupWPtnqJALxiNYmcaQZE+aIUi3W62AZp5V7aXuT0pkTNmqhPIe X-Virus-Checked: Checked by ClamAV on apache.org --0015173fedfaccdcc804d9f93a43 Content-Type: text/plain; charset=ISO-8859-1 thanks for the reply. Im not using any custom class loaders, I tried using the 4.2.1, i got the same issue, facet42 is found, but not lucene42. i have the facet.jar in my final jar. location="../libs/luceneV4.2/lucene-codecs-4.2.0.jar"/>* > * * > * ** One more information., when i run this program from my IDE(eclipse), it works and creates the index, It only fails when i create a jar out of my project and try to run from the jar. On Tue, Apr 9, 2013 at 6:03 PM, Uwe Schindler wrote: > There may be 2 problems, to fix: > a) use 4.2.1 (if you are using custom class loaders in your application) > b) The stack trace says, that it can only find the codec "Facet42". This > codec is only in lucene-facet.jar, but this JAR file is not in your > classpath. So you seem to have some classpath problem. > > Uwe > > ----- > Uwe Schindler > H.-H.-Meier-Allee 63, D-28213 Bremen > http://www.thetaphi.de > eMail: uwe@thetaphi.de > > > > -----Original Message----- > > From: Manivannan Selvadurai [mailto:manivannan@unmetric.com] > > Sent: Tuesday, April 09, 2013 1:15 PM > > To: java-user@lucene.apache.org > > Subject: Re: Cannot instantiate SPI class: > > org.apache.lucene.codecs.lucene42.Lucene42Codec > > > > i don't get what u mean by setup. im not using solr. Could u please be > more > > specific. > > we dont use maven for building the jar. Its just few build.xmls. It is > just plain > > Lucene 4.2. > > I have to create an index using some tokenizers and filters. > > > > with thanks, > > Manivannan > > > > > > On Tue, Apr 9, 2013 at 4:07 PM, Uwe Schindler wrote: > > > > > As mentioned in the original answer, what is the setup you are using? > > > > > > ----- > > > Uwe Schindler > > > H.-H.-Meier-Allee 63, D-28213 Bremen > > > http://www.thetaphi.de > > > eMail: uwe@thetaphi.de > > > > > > > > > > -----Original Message----- > > > > From: Manivannan Selvadurai [mailto:manivannan@unmetric.com] > > > > Sent: Tuesday, April 09, 2013 12:33 PM > > > > To: java-user@lucene.apache.org > > > > Subject: Re: Cannot instantiate SPI class: > > > > org.apache.lucene.codecs.lucene42.Lucene42Codec > > > > > > > > I dint understand what u mean by directly inside ant or just for > > > compiling, but > > > > this is the process we do Im using the Lucene jars in a build.xml > > > > and we > > > use > > > > ant to build the jar and i invoke the program on that resulting jar. > > > > > > > > > > > > So will using lucene 4.2.1 fix the issue for me? > > > > > > > > > > > > On Tue, Apr 9, 2013 at 3:50 PM, Uwe Schindler > > wrote: > > > > > > > > > This may be fixed in 4.2.1, but this depends on your setup. Are > > > > > you using Lucene directly inside ANT or is it just for compiling > code? > > > > > > > > > > Uwe > > > > > > > > > > ----- > > > > > Uwe Schindler > > > > > H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de > > > > > eMail: uwe@thetaphi.de > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > From: Manivannan Selvadurai [mailto:manivannan@unmetric.com] > > > > > > Sent: Tuesday, April 09, 2013 11:52 AM > > > > > > To: java-user@lucene.apache.org > > > > > > Subject: Cannot instantiate SPI class: > > > > > > org.apache.lucene.codecs.lucene42.Lucene42Codec > > > > > > > > > > > > Hi All, > > > > > > > > > > > > I'm facing this problem. > > > > > > When i build a jar out of my project and try to run the program > > > > > > that > > > > > invokes > > > > > > lucene part of the code, it gives me this exception > > > > > > > > > > > > Exception in thread "main" java.util.ServiceConfigurationError: > > > > > > Cannot instantiate SPI class: > > > > org.apache.lucene.codecs.lucene42.Lucene42Codec > > > > > > at > > > > > > > > > > > > org.apache.lucene.util.NamedSPILoader.reload(NamedSPILoader.java:72) > > > > > > at > > > > > > > > org.apache.lucene.util.NamedSPILoader.(NamedSPILoader.java:42) > > > > > > at > > > > > > > > org.apache.lucene.util.NamedSPILoader.(NamedSPILoader.java:37) > > > > > > at org.apache.lucene.codecs.Codec.(Codec.java:41) > > > > > > at > > > > > > > > org.apache.lucene.index.LiveIndexWriterConfig.(LiveIndexWriter > > > > > > Confi > > > > > > g.java:118) > > > > > > at > > > > > > > > org.apache.lucene.index.IndexWriterConfig.(IndexWriterConfig.j > > > > > > ava:1 > > > > > > 45) > > > > > > Caused by: java.lang.IllegalArgumentException: A SPI class of > type > > > > > > org.apache.lucene.codecs.DocValuesFormat with name 'Lucene42' > > does > > > > > > not exist. You need to add the corresponding JAR file supporting > > > > > > this SPI to > > > > > your > > > > > > classpath.The current classpath supports the following names: > > > [Facet42] > > > > > > at > > > > > > > > > > > > org.apache.lucene.util.NamedSPILoader.lookup(NamedSPILoader.java:104) > > > > > > at > > > > > > > > > > > > org.apache.lucene.codecs.DocValuesFormat.forName(DocValuesFormat.jav > > > > > > a:97) > > > > > > at > > > > > > > > > > > > org.apache.lucene.codecs.lucene42.Lucene42Codec.(Lucene42Codec > > > > > > .j > > > > > > ava:130) > > > > > > at > > > > > > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > > > > > Method) > > > > > > at > > > > > > > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruc > > > > > > tor > > > > > > AccessorImpl.java:39) > > > > > > at > > > > > > > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Delegating > > > > > > Con > > > > > > structorAccessorImpl.java:27) > > > > > > at > > > > > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > > > > > at java.lang.Class.newInstance0(Class.java:357) > > > > > > at java.lang.Class.newInstance(Class.java:310) > > > > > > at > > > > > > > > > > > > org.apache.lucene.util.NamedSPILoader.reload(NamedSPILoader.java:62) > > > > > > ... 7 more > > > > > > > > > > > > > > > > > > > > > > > > I have the entry in build.xml like this > > > > > > > > > > > > ** > > > > > > * * > > > > > > * > > > > > location="../libs/luceneV4.2/commons-compress-1.4.1.jar"/>* > > > > > > * location="../libs/luceneV4.2/icu4j-49.1.jar"/>* > > > > > > * > > > > location="../libs/luceneV4.2/jakarta-regexp-1.4.jar"/> > > > > > > * > > > > > > * > > > > > > location="../libs/luceneV4.2/lucene-analyzers-common-4.2.0.jar"/>* > > > > > > * > > > > > location="../libs/luceneV4.2/lucene-analyzers-icu-4.2.0.jar"/>* > > > > > > * > > > > > > location="../libs/luceneV4.2/lucene-analyzers-kuromoji-4.2.0.jar"/>* > > > > > > * > > > > > > > > location="../libs/luceneV4.2/lucene-analyzers-morfologik-4.2.0.jar"/>* > > > > > > * > > > > > > location="../libs/luceneV4.2/lucene-analyzers-phonetic-4.2.0.jar"/>* > > > > > > * > > > > > > location="../libs/luceneV4.2/lucene-analyzers-smartcn-4.2.0.jar"/>* > > > > > > * > > > > > > location="../libs/luceneV4.2/lucene-analyzers-stempel-4.2.0.jar"/>* > > > > > > * > > > > > location="../libs/luceneV4.2/lucene-analyzers-uima-4.2.0.jar"/>* > > > > > > * > > > > > location="../libs/luceneV4.2/lucene-benchmark-4.2.0.jar"/>* > > > > > > * > > > > > location="../libs/luceneV4.2/lucene-classification-4.2.0.jar"/>* > > > > > > * > > > > > location="../libs/luceneV4.2/lucene-codecs-4.2.0.jar"/>* > > > > > > * > > > > location="../libs/luceneV4.2/lucene-core-4.2.0.jar"/>* > > > > > > * > > > > location="../libs/luceneV4.2/lucene-facet-4.2.0.jar"/> > > > > > > * > > > > > > * > > > > > location="../libs/luceneV4.2/lucene-grouping-4.2.0.jar"/>* > > > > > > * > > > > > location="../libs/luceneV4.2/lucene-highlighter-4.2.0.jar"/>* > > > > > > * > > > > location="../libs/luceneV4.2/lucene-join-4.2.0.jar"/>* > > > > > > * > > > > > location="../libs/luceneV4.2/lucene-memory-4.2.0.jar"/>* > > > > > > * > > > > location="../libs/luceneV4.2/lucene-misc-4.2.0.jar"/>* > > > > > > * > > > > > location="../libs/luceneV4.2/lucene-queries-4.2.0.jar"/>* > > > > > > * > > > > > location="../libs/luceneV4.2/lucene-queryparser-4.2.0.jar"/>* > > > > > > * > > > > > location="../libs/luceneV4.2/lucene-sandbox-4.2.0.jar"/>* > > > > > > * > > > > > location="../libs/luceneV4.2/lucene-spatial-4.2.0.jar"/>* > > > > > > * > > > > > location="../libs/luceneV4.2/lucene-suggest-4.2.0.jar"/>* > > > > > > * > > > > > location="../libs/luceneV4.2/morfologik-fsa-1.5.5.jar"/>* > > > > > > * > > > > > location="../libs/luceneV4.2/morfologik-polish-1.5.5.jar"/>* > > > > > > * > > > > > location="../libs/luceneV4.2/morfologik-stemming-1.5.5.jar"/>* > > > > > > * > > > > location="../libs/luceneV4.2/nekohtml-1.9.17.jar"/>* > > > > > > * > > location="../libs/luceneV4.2/spatial4j-0.3.jar"/>* > > > > > > * > > location="../libs/luceneV4.2/Tagger-2.3.1.jar"/>* > > > > > > * > > > > location="../libs/luceneV4.2/uimaj-core-2.3.1.jar"/>* > > > > > > * > > > > > location="../libs/luceneV4.2/WhitespaceTokenizer-2.3.1.jar"/>* > > > > > > * > > > > location="../libs/luceneV4.2/xercesImpl-2.9.1.jar"/>* > > > > > > * * > > > > > > > > > > > > > > > > > > Please Help. > > > > > > > > > > > > -- > > > > > > *With Best Regards,* > > > > > > *Manivannan * > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > > > > > For additional commands, e-mail: java-user-help@lucene.apache.org > > > > > > > > > > > > > > > > > > > > > > -- > > > > *With Best Regards,* > > > > *Manivannan * > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > > > For additional commands, e-mail: java-user-help@lucene.apache.org > > > > > > > > > > > > -- > > *With Best Regards,* > > *Manivannan * > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > -- *With Best Regards,* *Manivannan * --0015173fedfaccdcc804d9f93a43--