Closed kevinm6 closed 1 year ago
For more info, this is the output of ls
for the directories I’ve set up on bundles table:
ls ~/.local/share/nvim/mason/packages/java-debug-adapter/extension/server/com.microsoft.java.debug.plugin-*.jar
com.microsoft.java.debug.plugin-0.41.0.jar
ls ~/.local/share/nvim/mason/packages/java-test/extension/server/*.jar
com.microsoft.java.test.plugin-0.37.1.jar
com.microsoft.java.test.runner-jar-with-dependencies.jar
junit-jupiter-api_5.9.0.jar
junit-jupiter-engine_5.9.0.jar
junit-jupiter-migrationsupport_5.9.0.jar
junit-jupiter-params_5.9.0.jar
junit-platform-commons_1.9.0.jar
junit-platform-engine_1.9.0.jar
junit-platform-launcher_1.9.0.jar
junit-platform-runner_1.9.0.jar
junit-platform-suite-api_1.9.0.jar
junit-platform-suite-commons_1.9.0.jar
junit-platform-suite-engine_1.9.0.jar
junit-vintage-engine_5.9.0.jar
org.apiguardian.api_1.1.2.jar
org.eclipse.jdt.junit4.runtime_1.3.0.v20220609-1843.jar
org.eclipse.jdt.junit5.runtime_1.1.0.v20220715-1030.jar
org.opentest4j_1.2.0.v20190826-0900.jar
this just happened to me today. In my case .jar is in my wildignore list, so replace
`vim.fn.glob( "~/.local/share/nvim/mason/packages/java-test/extension/server/.jar")to
vim.fn.glob( "~/.local/share/nvim/mason/packages/java-test/extension/server/*.jar", 1)`
solved my problem.
this just happened to me today. In my case .jar is in my wildignore list, so replace `vim.fn.glob( "~/.local/share/nvim/mason/packages/java-test/extension/server/.jar")
to
vim.fn.glob( "~/.local/share/nvim/mason/packages/java-test/extension/server/*.jar", 1)` solved my problem.
Thank you @liujoey for sharing your solution. Unfortunately I think there something more in my config going on that is “blocking” the expected behavior.
Could you share your config for java with nvim-jdtls?
@kevinm6 My java.lua gist I put it under ftplugin folder
With some changes now it works (following your hint @liujoey), thank you.
I’ve only noticed that in your implementation at line 64 vim.list_extend(bundles, extra_bundles)
is expecting two tables, but in your case bundles is a string, but maybe you are managing it differently!
I’m closing the issue since it’s working.
Yes, I just removed few lines of unnecessary code.
this just happened to me today. In my case .jar is in my wildignore list, so replace `vim.fn.glob( "~/.local/share/nvim/mason/packages/java-test/extension/server/.jar")
to
vim.fn.glob( "~/.local/share/nvim/mason/packages/java-test/extension/server/*.jar", 1)` solved my problem.
Thanks for pointing that out. I updated the examples in https://github.com/mfussenegger/nvim-jdtls/pull/359
LSP client configuration
Eclipse.jdt.ls version
1.16.0
Steps to Reproduce
In every Java project, with or without gradle, trying to test some method this is the result.
Expected Result
Just work and give me test evaluation.
Actual Result
Sometimes it worked. Especially after cleaning up workspace, uninstall jdtls and java-{test|debug} packages and reinstall them. After that, I always get the notification: "No LSP found for resolve possible test cases. Did you add the jar files?"
and this is LspLog: Failed to load extension bundles Load bundle list\norg.eclipse.core.runtime.CoreException: Load bundle list\n\tat org.eclipse.jdt.ls.core.internal.handlers.BundleUtils.loadBundles(BundleUtils.java:169)\n\tat org.eclipse.jdt.ls.core.internal.handlers.InitHandler.handleInitializationOptions(InitHandler.java:91)\n\tat org.eclipse.jdt.ls.core.internal.handlers.BaseInitHandler.initialize(BaseInitHandler.java:63)\n\tat org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.initialize(JDTLanguageServer.java:250)\n\tat java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:578)\n\tat org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)\n\tat org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)\n\tat org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)\n\tat org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)\n\tat org.eclipse.jdt.ls.core.internal.ParentProcessWatcher.lambda$0(ParentProcessWatcher.java:130)\n\tat org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)\n\tat org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)\n\tat org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)\n\tat java.base/java.lang.Thread.run(Thread.java:1589)\nContains: Failed to get bundleInfo for bundle from /Users/Kevin/.local/share/nvim/mason/packages/java-test/extension/server/com.microsoft.java.test.runner-jar-with-dependencies.jar