ltex-plus / vscode-ltex-plus

LTeX+: Grammar/spell checker :mag::heavy_check_mark: for VS Code using LanguageTool with support for LaTeX :mortar_board:, Markdown :pencil:, and others
https://marketplace.visualstudio.com/items?itemName=ltex-plus.vscode-ltex-plus
Mozilla Public License 2.0
63 stars 1 forks source link

Error from LTex+ upon opening LaTex project #32

Closed veronidan closed 2 months ago

veronidan commented 2 months ago

Describe the bug Error in LTex+ ext. upon opening any Latex project in VS Code

Steps to reproduce Steps to reproduce the behavior:

  1. Have LTex+ extension installed in VS Code (Older Ltex has been uninstalled)
  2. Open LaTex project in VS Code
  3. Project loads in, but see the error that immediately occurs in output of LTex Language Client. LTex has not loaded.

Expected behavior LTex+ loads and evaluates document files.

Sample document Occurs for any document (e.g., main.tex), not just a specific one.

LTeX configuration

"ltex.enabled": [ "bibtex", "context", "context.tex", "html", "latex", "markdown", "org", "restructuredtext", "rsweave" ], "npm.fetchOnlinePackageInfo": false, "ltex.sentenceCacheSize": 10000, "ltex.checkFrequency": "save", "remote.autoForwardPortsSource": "hybrid", "latex-workshop.latex.autoBuild.cleanAndRetry.enabled": false, "ltex.additionalRules.enablePickyRules": true, "ltex.java.path": "C:\Program Files (x86)\Java\jre1.8.0_421", "ltex.ltex-ls.logLevel": "finest"

"LTeX Language Server" log file

LTex Server log shows as blank

"LTeX Language Client" log file

2024-08-30T13:57:07.524Z Info: ltex-ls found in 'c:\Users{myUsername}.vscode\extensions\ltex-plus.vscode-ltex-plus-13.1.2\lib\ltex-ls-15.2.0'. 2024-08-30T13:57:07.524Z Info: 2024-08-30T13:57:07.524Z Info: Using ltex-ls from 'c:\Users{myUsername}.vscode\extensions\ltex-plus.vscode-ltex-plus-13.1.2\lib\ltex-ls-15.2.0'. 2024-08-30T13:57:07.524Z Info: Using Java from 'C:\Program Files (x86)\Java\jre1.8.0_421' (set in ltex.java.path). 2024-08-30T13:57:07.525Z Info: Testing ltex-ls... 2024-08-30T13:57:07.525Z Info: Command: "c:\Users\{myUsername}\.vscode\extensions\ltex-plus.vscode-ltex-plus-13.1.2\lib\ltex-ls-15.2.0\bin\ltex-ls.bat" 2024-08-30T13:57:07.525Z Info: Arguments: ["--version"] 2024-08-30T13:57:07.525Z Info: env['JAVA_HOME']: "C:\Program Files (x86)\Java\jre1.8.0_421" 2024-08-30T13:57:07.525Z Info: env['JAVA_OPTS']: "-Xms64m -Xmx512m" 2024-08-30T13:57:08.409Z Error: Test failed. 2024-08-30T13:57:08.409Z Error: Error details: 2024-08-30T13:57:08.409Z Info: ltex-ls terminated with non-zero exit code 1. 2024-08-30T13:57:08.409Z Info: stdout of ltex-ls: 2024-08-30T13:57:08.409Z Info: 2024-08-30T13:57:08.410Z Info: stderr of ltex-ls: 2024-08-30T13:57:08.410Z Info: Exception in thread "main" java.lang.UnsupportedClassVersionError: org/bsplines/ltexls/LtexLanguageServerLauncher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Version information

spitzerd commented 2 months ago

I guess the reason is the "ltex.java.path": "C:\Program Files (x86)\Java\jre1.8.0_421", This is Java 8, but LTeX LS (and also LTeX LS+) requires Java 11 Please remove the setting "ltex.java.path" and try it again

veronidan commented 2 months ago

Thank you spitzerd for your timely reply and work. Upon opening my project, an update of LTex+ occurred. Then, following your advice above put LTex+ up, ready, and working. Thank you.