-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[need info] [jdtls-extension] [Java 17] Problem with debug adapter in neovim using jdtls and microsoft/vcvode-java-test and microsoft/java-debug #3096
Comments
I fixed the "Failed to load extension bundles" error by filtering out the This is correct based on #2761 (comment), but apparently a harmless error according to mfussenegger/nvim-jdtls#31 (comment). In my Neovim lua config, I have the following: local function join_path(...)
local segments = { ... }
-- TODO: Get different path separator by OS.
local sep = '\\'
local path = ''
for i, segment in ipairs(segments) do
if i == 1 then -- first index starts at 1
path = segment
else
path = path .. sep .. segment
end
end
return path
end
local mason_packages_path = join_path(vim.fn.stdpath('data'), 'mason', 'packages')
local vscode_java_test_paths = vim.fn.glob(join_path(mason_packages_path,
'java-test', 'extension', 'server', '*.jar'), true)
vscode_java_test_paths = vim.split(vscode_java_test_paths, '\n')
vscode_java_test_paths = vim.tbl_filter(function(path)
return not vim.endswith(path, 'com.microsoft.java.test.runner-jar-with-dependencies.jar')
end, vscode_java_test_paths) This fixes that error, but I'm still unable to run unit-tests with
I'm also on Java 17, and using the latest vscode-java-test and java-debug bundles from Mason. I see similar information in my LSP log file:
|
Yes! I just deleted that jar and the error went away
For me the DAP does not even attach to the buffer... But that might be my fault... I will have to look into it more
Have tried on java 21, 20 and 17 with same results |
My plan is to revert back to older versions of JDTLS, the bundles, and various Neovim plugins. I'll try and follow-up here again if I can find a working set of older versions. |
Wow... That would be tough... as is not my only development stack.... anywho that would be appreciated Also, then this is not a JDTLS issue? |
It's hard to say! Maybe something from our logs will stand out to someone more familiar with JDTS. If you had a working set of versions, and only upgraded the version of JDTLS, then you could isolate the problem to some change introduced in that new version. Once I revert back to a working set of versions, then I'll upgrade each dependency - one at a time - to determine what makes the tests stop working. The versions of the various dependencies could be incompatible with each other. These include:
|
I see I actually started using neovim very recently... so I am on the latest version (0.9?? if I am not wrong)... I also use every thing you mentioned.... I don't really have any spare time now... But I'll try to check out other version combinations when I am free.. If you find something please do send a comment on this thread. Thanks! Cheers :) |
The following versions are a year or so old, but work for me:
Mason can't install older versions of JDTLS & (I made an issue about this here: williamboman/mason.nvim#1661.) If it's helpful, you can view my configuration here: |
I see.... I will have to try that out... Thanks for the heads up.. Cheers :) |
I am trying to set up java debugging in Neovim using nvim-dap and nvim-jdtls. The LSP and autocompletion works but the bundles for DAP are causing plugins (bundles from vscode-java-test and java-debug). These bundle have been installed using mason a package manager for LSP, DAPs, etc
Have JavaSE-17.0.6 installed and setup in env vars.
Closest issue similar to my problem, I found was this. Did not help
Is this a problem with my configuration?
Log provided by nvim-jdtls
Also here is my jdtls setup. Just in case.
The text was updated successfully, but these errors were encountered: