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 Ivan Vasilev <iv...@sirma.bg> on 2012/10/26 17:47:05 UTC
Exception on creation IndexWriterConfig with Version.LUCENE_40
Hi Guys,
When executing:
ndexWriterConfig iwc = new IndexWriterConfig(Version.LUCENE_40, new
MyAnalyzer());
I have the following exception:
Exception in thread "main" java.lang.ExceptionInInitializerError
at
org.apache.lucene.index.LiveIndexWriterConfig.<init>(LiveIndexWriterConfig.java:118)
at
org.apache.lucene.index.IndexWriterConfig.<init>(IndexWriterConfig.java:145)
at test.payloads.TestPayloads.main(TestPayloads.java:49)
Caused by: java.lang.IllegalArgumentException: A SPI class of type
org.apache.lucene.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: []
at
org.apache.lucene.util.NamedSPILoader.lookup(NamedSPILoader.java:104)
at org.apache.lucene.codecs.Codec.forName(Codec.java:95)
at org.apache.lucene.codecs.Codec.<clinit>(Codec.java:122)
... 3 more
My project includes as dependent the Lucene project including the
following packages:
org.apache.lucene.codecs
org.apache.lucene.codecs.lucene3x
org.apache.lucene.codecs.lucene40
org.apache.lucene.codecs.lucene40.values
org.apache.lucene.codecs.perfield
What other Lucene packages I need to include to avid the Exception?
I prefer adding source code instead of jar(s).
Cheers,
Ivan Vasilev
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Exception on creation IndexWriterConfig with Version.LUCENE_40
Posted by Ivan Vasilev <iv...@sirma.bg>.
Thanks Robert
On 26.10.2012 г. 18:49, Robert Muir wrote:
> On Fri, Oct 26, 2012 at 11:47 AM, Ivan Vasilev <iv...@sirma.bg> wrote:
>
> if you want to not use jars, then its not enough to add the
> <module>/src/java directories. you also need <module>/src/resources
> directories in the classpath
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Exception on creation IndexWriterConfig with Version.LUCENE_40
Posted by Robert Muir <rc...@gmail.com>.
On Fri, Oct 26, 2012 at 11:47 AM, Ivan Vasilev <iv...@sirma.bg> wrote:
if you want to not use jars, then its not enough to add the
<module>/src/java directories. you also need <module>/src/resources
directories in the classpath
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org