Hi,
I'm trying to use genetic algorithm on my database, but I'm facing a lot of problems with dependencies.
I'm using Duke 1.2 and I'm using Maven.
Is
<dependency>
<groupId>no.priv.garshol.duke</groupId>
<artifactId>duke</artifactId>
<version>1.2</version>
</dependency>
enough? Probably not because I get:
java.lang.NoClassDefFoundError: org/apache/lucene/codecs/lucene41/Lucene41PostingsFormat
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at org.apache.lucene.util.NamedSPILoader.reload(NamedSPILoader.java:62)
at org.apache.lucene.util.NamedSPILoader.<init>(NamedSPILoader.java:42)
at org.apache.lucene.util.NamedSPILoader.<init>(NamedSPILoader.java:37)
at org.apache.lucene.codecs.PostingsFormat.<clinit>(PostingsFormat.java:44)
at org.apache.lucene.codecs.lucene40.Lucene40Codec.<init>(Lucene40Codec.java:53)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at java.lang.Class.newInstance(Class.java:442)
at org.apache.lucene.util.NamedSPILoader.reload(NamedSPILoader.java:62)
at org.apache.lucene.util.NamedSPILoader.<init>(NamedSPILoader.java:42)
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:118)
at org.apache.lucene.index.IndexWriterConfig.<init>(IndexWriterConfig.java:145)
at no.priv.garshol.duke.databases.LuceneDatabase.openIndexes(LuceneDatabase.java:324)
at no.priv.garshol.duke.databases.LuceneDatabase.init(LuceneDatabase.java:301)
at no.priv.garshol.duke.databases.LuceneDatabase.index(LuceneDatabase.java:141)
at no.priv.garshol.duke.genetic.GeneticAlgorithm.run(GeneticAlgorithm.java:163)
at no.priv.garshol.duke.genetic.Driver.main(Driver.java:62)
at com.sandos.idal.identity.store.examples.GeneticDukeApp.main(GeneticDukeApp.java:9)
... 6 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.codecs.lucene41.Lucene41PostingsFormat
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 32 more
I tried to add Lucene dependencies (4.0.0 referencing [1]), and 4.1.0 (because the error is "speaking"), but got other class not found errors.
What is the minimal set of dependencies that I've to use?
Best regards,
Andrea
[1]
https://groups.google.com/forum/#!topic/duke-dedup/Pmeo1W_JrW4