Lucene An SPI class of type org.apache.lucene.codecs.Codec with name does not exist

if you are getting this error

An SPI class of type org.apache.lucene.codecs.Codec with name ‘Lucene54’ does not exist

Add Folders

If maven based project then add META-IN/services folders in src/main/resource

else just create META-IN/services folders inside classpath

And File

1- org.apache.lucene.codecs.Codec inside META-INF/services/

with following text inside

org.apache.lucene.codecs.lucene54.Lucene54Codec

It works. The key thing is to remember the version no of lucene jar should match org.apache.lucene.codecs.lucene54.Lucene54Codec text.  I m using lucene 5.4 so lucene54.Lucene54Code.

 

Thanks

 

Advertisements

2 thoughts on “Lucene An SPI class of type org.apache.lucene.codecs.Codec with name does not exist

  1. Vinod Km February 27, 2017 at 5:45 pm Reply

    Thanks it works.

  2. John Dusk March 8, 2017 at 9:15 pm Reply

    Solved my problem . Great

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: