Back to LanguageTool Homepage - Privacy - Imprint

Java API Example


(HENG EE TAY) #1

Hello,
I'm new here, and would like to use the API for my java program.
However, when I try to examine with the example gui program stated in the page, it does not work.
And, when I start from scratch and follow the instructions on the page, I got the exception:
Exception in thread "main" java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z
at com.fasterxml.jackson.databind.ObjectMapper.(ObjectMapper.java:564)
at com.fasterxml.jackson.databind.ObjectMapper.(ObjectMapper.java:474)
at org.languagetool.rules.OpenNMTRule.(OpenNMTRule.java:51)
at org.languagetool.rules.OpenNMTRule.(OpenNMTRule.java:65)
at org.languagetool.language.English.getRelevantRules(English.java:170)
at org.languagetool.language.BritishEnglish.getRelevantRules(BritishEnglish.java:46)
at org.languagetool.JLanguageTool.getAllBuiltinRules(JLanguageTool.java:265)
at org.languagetool.JLanguageTool.(JLanguageTool.java:184)
at org.languagetool.JLanguageTool.(JLanguageTool.java:165)
at myAnalyze.main(myAnalyze.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.uiDesigner.snapShooter.SnapShooter.main(SnapShooter.java:59)

Need help from you all. Thanks in advance!


(Daniel Naber) #2

Which documentation are you following and which version of Java are you using? Do you use Maven?


(HENG EE TAY) #3

I'm following the Java API page.
Yes, I did import with Maven using IntelliJ


(Daniel Naber) #4

What about this? https://stackoverflow.com/questions/27746750/exception-in-thread-main-java-lang-nosuchmethoderror-com-fasterxml-jackson-co


(HENG EE TAY) #5

Got it! thank you!!