You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by nischal reddy <ni...@gmail.com> on 2013/08/31 15:55:38 UTC

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.java: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>(LiveIndexWriterConfig.java:122)
    at
org.apache.lucene.index.IndexWriterConfig.<init>(IndexWriterConfig.java:148)
    at
com.progress.openedge.pdt.search.index.OEIndexer.initWriter(OEIndexer.java:177)
    at
com.progress.openedge.pdt.search.index.OEIndexer.init(OEIndexer.java:153)
    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>(ProgressSearchEngine.java:60)
    at
com.progress.openedge.pdt.search.impl.ProgressSearchEngine.initSearchEngine(ProgressSearchEngine.java:65)
    at
com.progress.openedge.pdt.search.OESearchStartup.earlyStartup(OESearchStartup.java:19)
    at
org.eclipse.ui.internal.EarlyStartupRunnable.runEarlyStartup(EarlyStartupRunnable.java:87)
    at
org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:66)
    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