lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: exception while initializing IndexConfigWriter
Date Sat, 31 Aug 2013 17:52:51 GMT
Hallo Nischal,

it looks like your classpath contains different Lucene versions mixed together. Lucene 4.4
would never use the old Lucene40Codec for writing a new index, so it looks like the SPI framework
chooses an older index version by default (the one of another Lucene version on the classpath).

Please clean up your classpath and make sure you are only using lucene-*-4.4.jar JAR file.

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: nischal reddy [mailto:nischal.srinivas@gmail.com]
> Sent: Saturday, August 31, 2013 4:24 PM
> To: java-user@lucene.apache.org
> Subject: exception while initializing IndexConfigWriter
> 
> Hi,
> 
> I am using lucene in my eclipse plugin, while initializing the IndexConfigWriter
> i am getting an exception (see below). Interesting part is when i am running a
> test.java class in the same plugin (with a main method with call to the same
> method) everything is working fine.
> But when i run the plugin as an eclipse application i am getting the below
> exception.
> 
> i am using Lucene 4.4.
> 
> The Code where i am getting the error is:
> 
> IndexWriterConfig iwriter = new IndexWriterConfig(Version.LUCENE_44,
> analyzer);
> 
> Exception trace:
> 
> !MESSAGE Unable to execute early startup code for an extension !STACK 0
> java.lang.ExceptionInInitializerError
>     at
> org.apache.lucene.codecs.lucene40.Lucene40Codec.<init>(Lucene40Codec.j
> ava:53)
>     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>     at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
> Source)
>     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> Source)
>     at java.lang.reflect.Constructor.newInstance(Unknown Source)
>     at java.lang.Class.newInstance0(Unknown Source)
>     at java.lang.Class.newInstance(Unknown Source)
>     at
> org.apache.lucene.util.NamedSPILoader.reload(NamedSPILoader.java:67)
>     at
> org.apache.lucene.util.NamedSPILoader.<init>(NamedSPILoader.java:45)
>     at
> org.apache.lucene.util.NamedSPILoader.<init>(NamedSPILoader.java:37)
>     at org.apache.lucene.codecs.Codec.<clinit>(Codec.java:41)
>     at
> org.apache.lucene.index.LiveIndexWriterConfig.<init>(LiveIndexWriterConfi
> g.java:122)
>     at
> org.apache.lucene.index.IndexWriterConfig.<init>(IndexWriterConfig.java:1
> 48)
>     at
> com.progress.openedge.pdt.search.index.OEIndexer.initWriter(OEIndexer.j
> ava:177)
>     at
> com.progress.openedge.pdt.search.index.OEIndexer.init(OEIndexer.java:15
> 3)
>     at
> com.progress.openedge.pdt.search.index.OEIndexer.<init>(OEIndexer.java:
> 115)
>     at
> com.progress.openedge.pdt.search.index.OEIndexer.initIndexer(OEIndexer
> .java:96)
>     at
> com.progress.openedge.pdt.search.impl.ProgressSearchEngine.<init>(Progr
> essSearchEngine.java:60)
>     at
> com.progress.openedge.pdt.search.impl.ProgressSearchEngine.initSearchEn
> gine(ProgressSearchEngine.java:65)
>     at
> com.progress.openedge.pdt.search.OESearchStartup.earlyStartup(OESearch
> Startup.java:19)
>     at
> org.eclipse.ui.internal.EarlyStartupRunnable.runEarlyStartup(EarlyStartupRun
> nable.java:87)
>     at
> org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:6
> 6)
>     at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
>     at org.eclipse.ui.internal.Workbench$63.run(Workbench.java:2465)
>     at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
> Caused by: java.lang.ClassCastException: class
> org.apache.lucene.codecs.lucene40.Lucene40PostingsFormat
>     at java.lang.Class.asSubclass(Unknown Source)
>     at
> org.apache.lucene.util.SPIClassIterator.next(SPIClassIterator.java:137)
>     at
> org.apache.lucene.util.NamedSPILoader.reload(NamedSPILoader.java:65)
>     at
> org.apache.lucene.util.NamedSPILoader.<init>(NamedSPILoader.java:47)
>     at
> org.apache.lucene.util.NamedSPILoader.<init>(NamedSPILoader.java:37)
>     at
> org.apache.lucene.codecs.PostingsFormat.<clinit>(PostingsFormat.java:44)
>     ... 25 more
> 
> Can someone please tell me what is going wrong.
> 
> TIA,
> Nischal Y


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message