lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <>
Subject RE: getting exception in lucene 4.0
Date Thu, 30 Apr 2015 14:01:49 GMT

This generally happens if you don't deploy the original Lucene JAR files and instead create
so-called super-jars (one large JAR file with all classes merged together). Unfortunately
this approach misses to copy/merge relevant metadata in the META-INF folder of the original
JARs. Without the metadata, Lucene cannot open the indexes.

If you place the original JAR files in your WEB-INF/lib folders, everything should work fine
unless you have some very strange class path / class loader problems.

You should also upgrade to a later Lucene 4 version, because the original one (4.0) was only
searching in context class loader for metadata. Lucene 4.3 fixes this issue by also searching
for metadata in the classloader that originally loaded the lucene jars:


Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen

> -----Original Message-----
> From: Rajendra Rao []
> Sent: Thursday, April 30, 2015 3:52 PM
> To:
> Subject: getting exception in lucene 4.0
> i am getting below exception while using apache lucene in web service with
> tomcat ,axis 2 .This exception is not coming in standalone application.
> Java.lang.IllegalArgumentException: A SPI class of type
> org.apache.lucene.codecs.Codec 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: []
>         at
> org.apache.lucene.util.NamedSPILoader.lookup(
>         at org.apache.lucene.codecs.Codec.forName(
>         at org.apache.lucene.codecs.Codec.<clinit>(
>         ... 37 more
> --
> Launchship Technology  respects your privacy. This email is intended only for
> the use of the party to which it is addressed and may contain information
> that is privileged, confidential, or protected by law. If you have received this
> message in error, or do not want to receive any further emails from us,
> please notify us immediately by replying to the message and deleting it from
> your computer.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message