Open aman7000 opened 2 years ago
Hello! It seems like you have the JAVA_HOME
environment variable defined. This variable is used to locate the user's installation of Java. Are you sure it's pointing to a valid installation? If it's not, you probably want to unset it altogether (if java
is already in your PATH), or set it to a valid directory
Hi,
After unsetting JAVA_HOME. Still getting the same error message. Java is in path
Output of java -version :- openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9) OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)
Output of :LspInfo
Language client log: /Users/amansingh/.cache/nvim/lsp.log Detected filetype: java
0 client(s) attached to this buffer:
Other clients that match the filetype: java
Config: jdtls filetypes: java root directory: /Users/amansingh/workspace/java/nbfc cmd: java -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Dlog.protocol=true -Dlog.level=ALL -Xms1g -Xmx2G -javaagent:/Users/amansingh/.local/share/nvim/lsp_servers/jdtls/lombok.jar --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -jar /Users/amansingh/.local/share/nvim/lsp_servers/jdtls/plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar -configuration /Users/amansingh/.local/share/nvim/lsp_servers/jdtls/config_mac -data /Users/amansingh/workspace/nbfc cmd is executable: false (checked by nvim-lsp-installer) Make sure you have set up nvim-lsp-installer (:h nvim-lsp-installer-quickstart) autostart: true custom handlers: workspace/applyEdit, textDocument/codeAction, language/status, textDocument/rename
Configured servers list: vimls, svelte, -- Regards,
Aman S Bains Jaguar Software India ORR, Hebbal, Bangalore, Karnataka 560032 Mob: +91 9666107000 www.JaguarSoftwareIndia.com http://www.jaguarsoftwareindia.com
*GO GREEN*: Please do not take printout of this mail unless it is unavoidable.
On Thu, 9 Jun 2022 at 04:06, William Boman @.***> wrote:
Hello! It seems like you have the JAVA_HOME environment variable defined. This variable is used to locate the user's installation of Java. Are you sure it's pointing to a valid installation? If it's not, you probably want to unset it altogether (if java is already in your PATH), or set it to a valid directory
— Reply to this email directly, view it on GitHub https://github.com/williamboman/nvim-lsp-installer/issues/763#issuecomment-1150481036, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADA2VTQSUOSRJFAX53PPIL3VOEOAVANCNFSM5YHAMOFQ . You are receiving this because you authored the thread.Message ID: @.***>
Have you checked the :LspLog
logs?
:LspLog is fine
[START][2022-06-09 13:13:11] LSP logging initiated [START][2022-06-09 13:15:29] LSP logging initiated [START][2022-06-09 13:17:03] LSP logging initiated [START][2022-06-09 13:22:09] LSP logging initiated [START][2022-06-09 13:28:06] LSP logging initiated [START][2022-06-09 13:24:22] LSP logging initiated [START][2022-06-10 18:24:19] LSP logging initiated [START][2022-06-10 18:40:07] LSP logging initiated [START][2022-06-10 18:47:30] LSP logging initiated [START][2022-06-11 13:17:27] LSP logging initiated [START][2022-06-11 13:45:52] LSP logging initiated [START][2022-06-11 13:46:05] LSP logging initiated [START][2022-06-11 13:46:33] LSP logging initiated [START][2022-06-11 15:21:48] LSP logging initiated
java lsp Just doesn't work ...
Try setting a lower log level to capture more information in :LspLog
(see :h lspconfig-logging
for how to do so). Do you see anything that could be helpful in your troubleshooting then?
I have the same problem. I don't see any errors being printed to the logs anymore (even witht the log level set to "info"), but I remember it used to say SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder
after the server exited.
I want to chime on this as well, after LspInstall jdtls today i saw the same issue, i believe this is likely JDTLS itself, being very unstable, possibly the most unstable language server i have ever seen. Pretty much every time i update that it breaks something or has issues starting, or you have to delete th workspaces folder to make it work, it is very, very bad.
Now what i propose is for people to use the milestone builds - for example i just downgraded to this one - https://download.eclipse.org/jdtls/milestones/1.9.0/.
I think LSP insatller should consider using milestone builds instead of snapshots, those seem to be more stable (better tested maybe, i can not really confirm).
Note: Going through their commits, i noticed that they might be trying to migrate to java17, maybe already have, which means that the next release will mandate 17 and may not even work on 11. But nobody really communicates that with the community.
Is there any way to downgrade via nvim-lsp-installer itself or would I have to do it manually?
I don't think so, downgrade is rather simple, download the tar ball and unzip the contents to the data folder - /home/{user}/.local\share\nvim\lsp_servers\jdtls
. I suggest delete everything in that folder first, without lombok (if you are using it, since milestone builds don't come with lombok i think, or you can also update lombok manually if you choose to do so) Then paste the contents of the archive. Avoid calling LspInstall jdtls or LspUpdate etc.
Alright, thanks!
You can specify version via LspInstall, like so:
:LspInstall jdtls@1.9.0-something
As for using milestone releases instead of snapshots - I think that makes sense! The reasons snapshots are currently used is because that's what the vscode plugin does. It seems like they don't provide the same endpoints to fetch the latest milestone, which they provide for snapshots, so that complicates things a bit.
You don't have to go all the way to 1.9
. :LspInstall jdtls@1.12.0-202206011637
works.
@williamboman Is it possible to have versions? something like jdtls@1.12.0-202206011637
in the config and auto install the specific version. At the moment it complains because the LS doesn't exist.
You can do something like
require("nvim-lsp-installer").setup {
ensure_installed = { "jdtls@1.12.0-202206011637" },
automatic_installation = { exclude = { "jdtls" } }
}
Same issue, switching to java 17 fixed it.
I'm not that versed in java version management chicanery, can I tell jdtls
to use one version so I'd keep the rest of my system on another?
Problem description
Java lsp does not work
Why do you think this is an issue with nvim-lsp-installer?
getting error on java file, instead of lsp loading. Error:- Client 1 quit with exit code 13 and signal 0
Neovim version (>= 0.7)
NVIM 0.7.0
Operating system/version
Mac
I've manually reviewed the Nvim LPS client log (
:LspLog
) to find potential errorsI've recently downloaded the latest plugin version of both nvim-lsp-installer and nvim-lspconfig
Affected language servers
java
Steps to reproduce
Actual behavior
error comes: Client 1 quit with exit code 1 and signal 0
Expected behavior
java Lsp should work
LspInfo
LspLog
No response
Healthcheck
Screenshots or recordings