Stratio / cassandra-lucene-index

Lucene based secondary indexes for Cassandra
Apache License 2.0
600 stars 170 forks source link

Cassandra 3.9 (Sept 29 build) fails to load with exception using branch-3.9 #216

Closed karlbunnell closed 7 years ago

karlbunnell commented 8 years ago

The following exception is thrown: Caused by: java.lang.NoSuchMethodError: org.tartarus.snowball.Among.(Ljava/lang/String;IILjava/lang/String;Lorg/tartarus/snowball/SnowballProgram;)V at org.tartarus.snowball.ext.englishStemmer.(englishStemmer.java:18) ~[snowball-stemmer-1.3.0.581.1.jar:na] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_91] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_91] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_91] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_91] at org.apache.cassandra.index.sasi.analyzer.filter.StemmerFactory.getStemmer(StemmerFactory.java:92) ~[apache-cassandra-3.9.jar:3.9] at org.apache.cassandra.index.sasi.analyzer.filter.StemmingFilters$DefaultStemmingFilter.(StemmingFilters.java:35) ~[apache-cassandra-3.9.jar:3.9] at org.apache.cassandra.index.sasi.analyzer.StandardAnalyzer.getFilterPipeline(StandardAnalyzer.java:134) ~[apache-cassandra-3.9.jar:3.9] at org.apache.cassandra.index.sasi.analyzer.StandardAnalyzer.init(StandardAnalyzer.java:153) ~[apache-cassandra-3.9.jar:3.9] at org.apache.cassandra.index.sasi.analyzer.StandardAnalyzer.init(StandardAnalyzer.java:140) ~[apache-cassandra-3.9.jar:3.9] at org.apache.cassandra.index.sasi.conf.ColumnIndex.getAnalyzer(ColumnIndex.java:183) ~[apache-cassandra-3.9.jar:3.9] at org.apache.cassandra.index.sasi.conf.ColumnIndex.(ColumnIndex.java:82) ~[apache-cassandra-3.9.jar:3.9] at org.apache.cassandra.index.sasi.SASIIndex.(SASIIndex.java:103) ~[apache-cassandra-3.9.jar:3.9] ... 18 common frames omitted

adelapena commented 8 years ago

It seems there is a dependency conflict between Lucene's and SASI versions of org.tartarus.snowball analyzer. We are working on it and hope to have a solution during the upcoming week. Thanks for reporting.

adelapena commented 8 years ago

We are working on a fix in this branch. It seems solved, but we have to do some additional tests before merging and publishing a new release.

adelapena commented 8 years ago

We have just created a PR (#217) solving the problem. We have modified the Lucene index to use the same version of the Snowball stemmer that SASI uses. This is an older version without support for Irish, Armenian, Basque and Catalan. Fortunately, these languages are supported by pre-built Lucene's standard analyzers.

ealonsodb commented 8 years ago

The PR(#217) is already included in 3.8.1 and 3.9.1 releases. Cheers

adelapena commented 7 years ago

Merged also in 3.0.9 branch.

kilgur commented 7 years ago

Hi. What about merging this patch to branch-3.10?

kilgur commented 7 years ago

I had build cassandra-lucene-index from branch-3.10 and got cassandra-lucene-index-plugin-3.10.0-RC1-SNAPSHOT.jar. After trying to use it i had got the exception:

WARN  [ReadStage-1] 2017-04-07 15:14:18,196 AbstractLocalAwareExecutorService.java:167 - Uncaught exception on thread Thread[ReadStage-1,5,main]: 
{}
java.lang.NoClassDefFoundError: Could not initialize class org.tartarus.snowball.ext.RussianStemmer
        at org.apache.lucene.analysis.ru.RussianAnalyzer.createComponents(RussianAnalyzer.java:128) ~[cassandra-lucene-index-plugin-3.10.0-RC1-SNAPSHOT.jar:na]
        at org.apache.lucene.analysis.AnalyzerWrapper.createComponents(AnalyzerWrapper.java:101) ~[cassandra-lucene-index-plugin-3.10.0-RC1-SNAPSHOT.jar:na]
        at org.apache.lucene.analysis.AnalyzerWrapper.createComponents(AnalyzerWrapper.java:101) ~[cassandra-lucene-index-plugin-3.10.0-RC1-SNAPSHOT.jar:na]
...

After removing snowball-stemmer-1.3.0.581.1.jar from cassandra I have got another exception - like in this issue:

ERROR [Native-Transport-Requests-1] 2017-04-08 00:38:12,085 Message.java:623 - Unexpected exception during request; channel = [id: 0x9c832f13, L:/
127.0.0.1:9042 - R:/127.0.0.1:34752]
java.lang.NoSuchMethodError: org.tartarus.snowball.Among.<init>(Ljava/lang/String;IILjava/lang/String;Ljava/lang/invoke/MethodHandles$Lookup;)V
        at org.tartarus.snowball.ext.RussianStemmer.<clinit>(RussianStemmer.java:19) ~[cassandra-lucene-index-plugin-3.10.0-RC1-SNAPSHOT.jar:na]
        at org.apache.lucene.analysis.ru.RussianAnalyzer.createComponents(RussianAnalyzer.java:128) ~[cassandra-lucene-index-plugin-3.10.0-RC1-SNAPSHOT.jar:na]
...

Is there the possibility to merge the patch to branch-3.10?