Back to LanguageTool Homepage - Privacy - Imprint

LanguageTool 4.9 No appropriate language found error

I am using the maven dependency for LanguageTool in my pom.xml with the artifactId of language-all.

I have upgraded from LanguageTool 4.8 from 4.9.

I am now getting the following error in my app:
No appropriate language found, not even en-US. Supported languages: [Arabic, Arabic (Algeria)]

Before, in v4.8, LanguageTool handled all the other languages.

Not sure it is related, but I noticed that the file has only got the following:

Having said that in v4.8 it only seemed to contain the English languages but it still worked for all of the other languages:

What has changed in v4.9 to cause this?



Hi, I don’t know of any change related to this in 4.9. There should be several files, each containing the class references for its language. Where exactly did you find the file that only contains Arabic?

Hi Daniel,

I uncompressed our application .jar file and the file that contains Arabic was in the META-INF/org/languagetool.


That sounds like your process that builds the JARs only keeps one of the several files from LanguageTool.

Hi Daniel,

Our build process is identical to when we used v4.8 which did work so not sure why there is a change in 4.9.

I grepped for in both the working version 4.8 and version 4.9 and it only appears in META-INF/org/languagetool/

Any other suggestions?

Thanks for your help

The code in LT is this: Enumeration<URL> propertyFiles = Language.class.getClassLoader().getResources(PROPERTIES_PATH);. So we look for all files named and consider them. If there’s only one, and that one has only Arabic, LT won’t work for English. I’m not sure why it used to work before. Are you sure there’s no exception thrown anywhere that you might miss?

Given Arabic's alphabetic position, it’s possible that somewhere along the line an array variable has been miscast into a singular variable. (instead of getting the array of files, you get only the first entry of the array … only question is, where does it happen?)

Thanks for your replies.

We use the maven shade plugin which packages our app in an “uber jar”.
I think there may be an issue where we are messing up the file when we are packaging our app.

I will investigate and update this thread when I have discovered more info.

Thanks for all your pointers.

I have discovered what the issue is now. Thanks for everyones help.

If you use the maven shade plugin, you need to add the following to your pom under the maven-shade-plugin section:

    <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">

This will ensure that all are appended correctly.

1 Like