Back to LanguageTool Homepage - Privacy - Imprint

java.lang.NoSuchMethodError thrown

I run this code:

JLanguageTool langTool = new JLanguageTool(new AmericanEnglish());
try {
      List<RuleMatch> matches = langTool.check(text);
} catch (IOException e1) {
      // TODO Auto-generated catch block

And I get the following relevant stack trace. I cannot share my text unfortunately unless you can tell me what might be causing it and I can send a snip.

Jan 12, 2018 6:47:22 PM org.apache.uima.collection.impl.cpm.engine.CPMThreadGroup process
SEVERE: The CPM thread group caught the following unhandled error: java.lang.NoSuchMethodError (Thread Name: [Procesing Pipeline#1 Thread]::slight_smile:
java.lang.NoSuchMethodError: org.apache.commons.lang3.StringUtils.equalsAny(Ljava/lang/CharSequence;[Ljava/lang/CharSequence;)Z
at org.languagetool.tokenizers.WordTokenizer.urlEndsAt(
at org.languagetool.tokenizers.WordTokenizer.joinUrls(
at org.languagetool.tokenizers.WordTokenizer.joinEMailsAndUrls(
at org.languagetool.tokenizers.en.EnglishWordTokenizer.tokenize(
at org.languagetool.JLanguageTool.getRawAnalyzedSentence(
at org.languagetool.JLanguageTool.getAnalyzedSentence(
at org.languagetool.JLanguageTool.analyzeSentences(
at org.languagetool.JLanguageTool.check(
at org.languagetool.JLanguageTool.check(
at org.languagetool.JLanguageTool.check(
at org.languagetool.JLanguageTool.check(

How did you build your code, using Maven or Gradle? Or did you run it inside the IDE? In any case, the dependencies seem to be messed up. I suggest using Maven or Gradle as documented at

Very strange. I linked the .jar file in eclipse and it didn’t work but the same library downloaded via maven worked fine. Sorry about that. Just a very strange error.