FS#31784 - [languagetool] fail to run thought 'java -jar' commandline

Attached to Project: Community Packages
Opened by Martin Ortbauer (mortbauer) - Wednesday, 03 October 2012, 09:18 GMT
Last edited by Andrzej Giniewicz (Giniu) - Wednesday, 03 October 2012, 21:24 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Andrzej Giniewicz (Giniu)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

the command:

[code]
java -jar /usr/share/java/languagetool/LanguageTool.jar filename
[/code]

fails with the message:

[code]
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.languagetool.language.English.getSentenceTokenizer(English.java:69)
at org.languagetool.Main.main(Main.java:468)
Caused by: java.lang.RuntimeException: Path /segment.srx not found in class path at /resource/segment.srx
at org.languagetool.databroker.DefaultResourceDataBroker.assertNotNull(DefaultResourceDataBroker.java:233)
at org.languagetool.databroker.DefaultResourceDataBroker.getFromResourceDirAsStream(DefaultResourceDataBroker.java:141)
at org.languagetool.tokenizers.SRXSentenceTokenizer.createSrxDocument(SRXSentenceTokenizer.java:56)
at org.languagetool.tokenizers.SRXSentenceTokenizer.<clinit>(SRXSentenceTokenizer.java:47)
... 2 more
[/code]

Though the normal commandline usage works, but the specified usage should work as well and is needed for example for the vim integration of the languagetool.

The used package version is:

languagetool 1.8-7

This task depends upon

Closed by  Andrzej Giniewicz (Giniu)
Wednesday, 03 October 2012, 21:24 GMT
Reason for closing:  Won't fix
Additional comments about closing:  the package follows official guidelines and works from executable script, mentioned syntax (running it manually by calling .jar file) works when correct classpath is set.
Comment by Andrzej Giniewicz (Giniu) - Wednesday, 03 October 2012, 19:45 GMT
Package layout was adjusted to follow Java package guidelines. It's easy to modify scripts that use it (I know only about Vim integration) by adding classpath to "java -jar" or eventually using CLASSPATH variable if all else fails. See https://wiki.archlinux.org/index.php/Java_Package_Guidelines for details. Vim integration plugin in AUR (maintained by me - https://aur.archlinux.org/packages.php?ID=41202 ) contains modification that makes it call languagetool script instead of jar directly (since 1.21-2) and works with LT 1.8.

(btw, yes - I know they are out of date, I will update languagetool and vim plugin in next few days)

Loading...