gregh
(gregh)
November 10, 2016, 3:49pm
1
Hello
I am getting this exception:
Caused by: java.lang.NoSuchMethodError: org.apache.commons.lang.ObjectUtils.clone(Ljava/lang/Object;)Ljava/lang/Object;
After upgrading to version 3.5. There is a clone method on org.apache.commons.lang3.ObjectUtils.
Cheers
dnaber
(Daniel Naber)
November 10, 2016, 4:02pm
2
Could you post the complete stack trace? When exactly does this happen?
gregh
(gregh)
November 10, 2016, 4:11pm
3
Sorry, checking on my dependencies it was using commons-lang-2.4.jar and I think your classes uses commons-lang-2.6.jar. Everyone has now upgraded to lang3 but language tool plus one other are still using the old lan2. Is it possible to switch to lang3 here as version 2 is end of life now.
dnaber
(Daniel Naber)
November 10, 2016, 5:49pm
4
I’ve just done that (here ). As one of our (unmaintained, it seems) dependencies is still on commons-lang 2.6, that still needs to be in the classpath, though.
gregh
(gregh)
November 11, 2016, 7:56am
5
OK great, checking on my dependencies it is only on the langualetool-core, possibly I exclude the jar that uses the 2.6 version? Which jar uses 2.6?
dnaber
(Daniel Naber)
November 11, 2016, 8:22am
6
Actually lang-zh
is still on 2.4, languagetool-dev
(which shouldn’t be relevant at runtime) is still at 2.6.
gregh
(gregh)
November 11, 2016, 8:35am
7
If its -zh, as I only use -en it should be gone.
org.languagetool
language-en
I do get a polish jar from morfologik-speller ??
morfologik-polish-2.0.0.jar
Cheers
dnaber
(Daniel Naber)
November 11, 2016, 8:56am
8
I cannot reproduce that, could you check (and maybe post) the complete output of mvn dependency:report
?
gregh
(gregh)
November 11, 2016, 9:02am
9
[INFO] +- org.languagetool:language-en:jar:3.5:compile
[INFO] | +- org.languagetool:languagetool-core:jar:3.5:compile
[INFO] | | +- commons-lang:commons-lang:jar:2.6:compile
[INFO] | | +- net.java.dev.jna:jna:jar:4.1.0:compile
[INFO] | | +- org.carrot2:morfologik-fsa:jar:2.1.0:compile
[INFO] | | +- org.carrot2:morfologik-fsa-builders:jar:2.1.0:compile
[INFO] | | +- org.carrot2:morfologik-speller:jar:2.1.0:compile
[INFO] | | | \- org.carrot2:morfologik-polish:jar:2.0.0:compile
[INFO] | | +- org.carrot2:morfologik-stemming:jar:2.1.0:compile
[INFO] | | +- com.carrotsearch:hppc:jar:0.7.1:compile
[INFO] | | +- net.loomchild:segment:jar:2.0.0:compile
[INFO] | | +- com.optimaize.languagedetector:language-detector:jar:0.5:compile
[INFO] | | | \- net.arnx:jsonic:jar:1.2.11:compile
[INFO] | | +- com.intellij:annotations:jar:12.0:compile
[INFO] | | \- edu.berkeley.nlp:berkeleylm:jar:1.1.2:compile
[INFO] | +- org.apache.opennlp:opennlp-tools:jar:1.6.0:compile
[INFO] | +- edu.washington.cs.knowitall:opennlp-tokenize-models:jar:1.5:compile
[INFO] | +- edu.washington.cs.knowitall:opennlp-postag-models:jar:1.5:compile
[INFO] | \- edu.washington.cs.knowitall:opennlp-chunk-models:jar:1.5:compile
dnaber
(Daniel Naber)
November 11, 2016, 9:09am
10
Maybe there was a bug in Morfologik 2.1.0 (used by LT 3.5), but it should be fixed in git, as I cannot reproduce this. We’re using Morfologik 2.1.2 now.
gregh
(gregh)
November 11, 2016, 9:26am
11
I just specify 3.5 and Morfologik is only used for me by language tool so not sure why I only get 2.1.0.
gregh
(gregh)
November 11, 2016, 9:30am
12
If I only want to spell check do you know what jars I actually need?
dnaber
(Daniel Naber)
November 11, 2016, 9:44am
13
No sorry, you’ll have to try.