How to make a 100% pure Java installation (on server)

Hi all,

is it possible to make an installation without the JNA stuff and the native libraries? I tried to omit the JNA jar and the “hunspell-native-libs.jar” without success. English checking worked fine, but the German checkers fail with either “java.lang.ClassNotFoundException: com.sun.jna.Library” or “java.lang.NoClassDefFoundError: org/languagetool/rules/spelling/hunspell/HunspellLibrary”.

I need a 100% pure Java installation on server that does not require any native libs. Is this possible?

Regards,
Jan

Am 15.07.2013 17:27, schrieb jnborche [via LanguageTool User Forum]:

is it possible to make an installation without the JNA stuff and the
native libraries?

Not yet, at least not if you need spell checking for German etc. If you
don’t need it, you could disable the rule like this and see if that
works:

langTool.disableRule(GermanSpellerRule.RULE_ID)

Similar for other languages (who all have different ids,
unfortunately).

Regards
Daniel

hi all,
I’m getting an error which I suspect is caused by a similar issue:
Caused by: java.lang.Error: The system cannot find the path specified.|
at com.sun.jna.Native.open(Native Method)|
[…]
at org.languagetool.rules.spelling.hunspell.Hunspell.(Hunspell.java:127)|
at org.languagetool.rules.spelling.hunspell.Hunspell.getInstance(Hunspell.java:68)|
at org.languagetool.rules.spelling.hunspell.Hunspell.getInstance(Hunspell.java:54)|
at org.languagetool.rules.spelling.hunspell.HunspellRule.init(HunspellRule.java:166)|
at org.languagetool.rules.spelling.hunspell.HunspellRule.match(HunspellRule.java:81)|
at org.languagetool.JLanguageTool.checkAnalyzedSentence(JLanguageTool.java:670)|
at org.languagetool.JLanguageTool$TextCheckCallable.call(JLanguageTool.java:979)|
at org.languagetool.JLanguageTool$TextCheckCallable.call(JLanguageTool.java:946)|
at org.languagetool.JLanguageTool.performCheck(JLanguageTool.java:615)|
at org.languagetool.JLanguageTool.check(JLanguageTool.java:571)|
at org.languagetool.JLanguageTool.check(JLanguageTool.java:529)|
at org.languagetool.JLanguageTool.check(JLanguageTool.java:525)|

I’m experiencing this problem while embedding LanguageTool in a server web application, to expose LT as a SOAP service. Invocations for English are ok, but as soon as I check a different language (e.g. French) I get errors.
I can see the previous reply, but it’s 1 yo. Thus, I would be grateful if anyone could share any insight on which languages are available even withouth native libraries (in addition to English) and whether there’s any way to remove native libraries completely.
I’m running my tests with both LT version 2.4 and 2.6.
Thanks a lot in advance, regards
Vincenzo

All languages that have a dependency on hunspell-native-libs use, well, hunspell native code. Currently, these are: ast tl sv ru da es pt fr is km eo de gl nl (nothing or not much has changed since last year)

Anyway, what you can see at e.g. http://community.languagetool.org is also a web application and all the languages work fine there (it’s running in Tomcat).

Thanks a lot!
At the moment I have hunspell-native-libs-2.6.jar correctly deployed along with the web app.
Is there any specific tuning/setting required to make the native libraries available on a server environment?
For instance, jvm 32 bit vs 64 bit?

Thanks, regards
Vincenzo

For Tomcat, I never had to make any special settings. What platform and operating system are you on? Both 32 and 64bit binaries are included in the JAR.

Hi, thanks for your kind reply.
You are right, my application works ok on Tomcat with no need for modifications, same PC.
I get the error above if I deploy to my target server (Eclipse Virgo + couple of proprietary plugins).
Any experience on LT + Virgo?
Thanks a lot
Regards
Vincenzo

I haven’t used Virgo. I’ve forwarded your question to our mailing list and asked people to reply here, in case they can help.

Thanks a lot, that’s very kind.
I’ll keep investigating on why this happens.
Vincenzo

I just realized that I was not in the LT mailing list.
I just subscribed the development ml.
Was there any update in the meanwhile?
Thanks a lot, regards
Vincenzo

Sorry, nobody replied to that question on the mailing list.