Home » » Solr Error: A SPI class of type org.apache.lucene.index.codecs.Codec with name ‘Lucene40′ does not exist

Solr Error: A SPI class of type org.apache.lucene.index.codecs.Codec with name ‘Lucene40′ does not exist

When you are testing Solr in Eclipse, you may encounter the problem that “A SPI class of type org.apache.lucene.index.codecs.Codec with name ‘Lucene40′ does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath.The current classpath supports the following names: []”
The fast answer to tackle this problem is to add the lucene-core*.jar to the libaries of your project, and make sure that the file /META-INF/services/org.apache.lucene.index.codecs.Codec is included in lucene-core*.jar. 
The problem is caused by the class of java.util.ServiceLoader used in NamedSPILoader of Solr. When ServiceLoader creates a new service provider, it will extract some information from /META-INF/services/org.apache.lucene.index.codecs.Codec. Therefore when you use build classes rather than the lucene-core*.jar file, the needed information can not be obtained. By now, I think you can handle this problem yourself. 
For more information about How ServiceLoader work, please refer to: 

2 Comments:

Lee Knight said...

Good evening people! We’ll demonstrate your in-depth competence in the examined field by depicting your in-depth understanding of the present state of the research topic. Our custom writers will choose a proper methodology for your work by following all the needed requirements and implementing useful tools.

whome2249 said...

My life's work is sports, so in my studies I use the essay that is an essaypro scam, which does an excellent job with any term paper, as well as other written work, and I can recommend this assistant to other students.

Popular Posts