Repository navigation
Description
Did you check docs and existing issues?
- I have read all the plugin docs
- I have searched the existing issues
- I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
0.11.5
Operating system/version
macOS 26.1
Describe the bug
I've updated nvim-java to the lates (4.0.4 I believe) and had it install it's dependencies. Now, when I open a java file, jdtls fails to start. I'm baffled as to what's going wrong.
Here are my lsp.logs:
[START][2025-12-16 22:41:48] LSP logging initiated
[ERROR][2025-12-16 22:41:48] ...p/_transport.lua:36 "rpc" "/opt/homebrew/Caskroom/graalvm-community-jdk22/22.0.2/graalvm-community-openjdk-22.0.2+9.1/Contents/Home/bin/java" "stderr" "Disabling server log output. No more output will be sent after this.\n"
[ERROR][2025-12-16 22:41:48] ...p/_transport.lua:36 "rpc" "/Users/foo/.local/share/nvim/nvim-java/packages/openjdk/25/jdk-25.0.1.jdk/Contents/Home/bin/java" "stderr" "WARNING: Using incubator modules: jdk.incubator.vector\n"
[ERROR][2025-12-16 22:41:48] ...p/_transport.lua:36 "rpc" "/Users/foo/.local/share/nvim/nvim-java/packages/openjdk/25/jdk-25.0.1.jdk/Contents/Home/bin/java" "stderr" "WARNING: A terminally deprecated method in sun.misc.Unsafe has been called\nWARNING: sun.misc.Unsafe::staticFieldOffset has been called by org.eclipse.osgi.internal.url.MultiplexingFactory (file:/Users/foo/.local/share/nvim/nvim-java/packages/jdtls/1.43.0/plugins/org.eclipse.osgi_3.23.0.v20241212-0858.jar)\nWARNING: Please consider reporting this to the maintainers of class org.eclipse.osgi.internal.url.MultiplexingFactory\nWARNING: sun.misc.Unsafe::staticFieldOffset will be removed in a future release\n"
[ERROR][2025-12-16 22:41:48] ...p/_transport.lua:36 "rpc" "/Users/foo/.local/share/nvim/nvim-java/packages/openjdk/25/jdk-25.0.1.jdk/Contents/Home/bin/java" "stderr" "WARNING: A restricted method in "
[ERROR][2025-12-16 22:41:48] ...p/_transport.lua:36 "rpc" "/Users/foo/.local/share/nvim/nvim-java/packages/openjdk/25/jdk-25.0.1.jdk/Contents/Home/bin/java" "stderr" "java.lang.Runtime has been called\nWARNING: java.lang.Runtime::load has been called by org.eclipse.equinox.launcher.JNIBridge in an unnamed module (file:/Users/foo/.local/share/nvim/nvim-java/packages/jdtls/1.43.0/plugins/org.eclipse.equinox.launcher_1.6.900.v20240613-2009.jar)\nWARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module\nWARNING: Restricted methods will be blocked in a future release unless native access is enabled\n\n"
[ERROR][2025-12-16 22:41:48] ...p/_transport.lua:36 "rpc" "/Users/foo/.local/share/nvim/nvim-java/packages/openjdk/25/jdk-25.0.1.jdk/Contents/Home/bin/java" "stderr" "Dec 16, 2025 10:41:48 PM org.apache.aries.spifly.BaseActivator log\nINFO: Registered provider ch.qos.logback.classic.servlet.LogbackServletContainerInitializer of service jakarta.servlet.ServletContainerInitializer in bundle ch.qos.logback.classic\n"
[ERROR][2025-12-16 22:41:48] ...p/_transport.lua:36 "rpc" "/Users/foo/.local/share/nvim/nvim-java/packages/openjdk/25/jdk-25.0.1.jdk/Contents/Home/bin/java" "stderr" "Dec 16, 2025 10:41:48 PM org.apache.aries.spifly.BaseActivator log\nINFO: Registered provider ch.qos.logback.classic.spi.LogbackServiceProvider of service org.slf4j.spi.SLF4JServiceProvider in bundle ch.qos.logback.classic\n"
[WARN][2025-12-16 22:41:49] ...m/lsp/client.lua:875 "The language server spring-boot triggers a registerCapability handler for workspace/didChangeWorkspaceFolders despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[WARN][2025-12-16 22:41:49] ...m/lsp/client.lua:875 "The language server spring-boot triggers a registerCapability handler for textDocument/semanticTokens despite dynamicRegistration set to false. Report upstream, this warning is harmless"
Steps To Reproduce
Include a LazyVim plugin for nvim-java with default settings and new vim.lsp.enabled
Open a java file
Expected Behavior
Should load the jdtls lsp correctly
Activity
logrusx commentedon Dec 17, 2025
Did you delete jdtls workspace, metadata et.c.?
defields923 commentedon Dec 17, 2025
I tried removing the .cache/jdtls and .local/share/nvim/nvim-java/packages, then reinstalling, then I deleted all the generated dot files in my project. jdtls still fails, none of those metadata files get recreated.
logrusx commentedon Dec 17, 2025
You most probably didn't delete the correct ones. Those most probably are left outs from previous versions/ installations
defields923 commentedon Dec 17, 2025
Any suggestions as for locations I'm missing? There are no more metadata files in my local project. Aside from cache/jdtls and nvim-java/packages, what else should I clean up?
s1n7ax commentedon Dec 17, 2025
@defields923 There should be a dir at
~/.cache/nvim/jdtlsnot the one in~/.cache/jdtlsdefields923 commentedon Dec 17, 2025
@s1n7ax Thanks, I tried deleting many locations, including .cache/nvim as well as .cache/jdtls. Still the same issue.
I've changed my version back to 3 and it works that way, so I'll stick to it for now.
logrusx commentedon Dec 17, 2025
@defields923
Sorry for not being able to provide the correct paths, I'm on the go.
Do you still have the jdtls installed through mason? If so that might be the reason,
Try
find ~ -name *jdtls*. It'll show you all the directories containing jdtls in their name in your home directory. I think that would be sufficient but you may want to replace jdtls with metadata or workspace to find other possibilities. BE careful not to delete some non-related directories.Delete the ones that are clearly jdtls workspace files except if you're using eclipse or jdtls with another environment.
Also what is this:
/opt/homebrew/Caskroom/graalvm-community-jdk22/22.0.2/graalvm-community-openjdk-22.0.2+9.1/Contents/Home/bin/javadefields923 commentedon Dec 17, 2025
@logrusx I did make sure mason didn't have any of the leftover dependencies. I'll be more thorough in my next attempt when I have a chance.
The graalvm-community-openjdk is my JAVA_HOME for this specific project that I'm attempting to load jdtls within. It has specific requirements, otherwise I use community openjdk21 as default.
logrusx commentedon Dec 17, 2025
When I said what is this I meant it was suspicious, not that I wanted to know :)
defields923 commentedon Dec 17, 2025
Yes, it is suspicious that it's involves here at all. I'll try other projects later.
s1n7ax commentedon Dec 17, 2025
There could be one other issue. We went from multi repo to monorepo. Lazy.nvim could be keeping the previous packages. Can you try either running a clean or manually deleting nvim-java-* plugins from lazy dir
s1n7ax commentedon Dec 17, 2025
If not working could you enable debug logging in nvim-java and try again, then post the logs here. You can enable the debug logs in the config.
a-usr commentedon Feb 19, 2026
I've been running into the same issue. Worth noting is that this only occurs when running jdtls using jdk25. jdk21 works fine.