Skip to content

bug: No delegateCommandHandler for vscode.java.test.findTestTypesAndMethods #293

@ShouryaRSharma

Description

@ShouryaRSharma

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)

v0.10.1

Operating system/version

MacOS 14.4.1

Describe the bug

I have an installation of nvim-java as follows -

{
    "nvim-java/nvim-java",
    dependencies = {
      "neovim/nvim-lspconfig",
      'nvim-java/lua-async-await',
      'nvim-java/nvim-java-refactor',
      'nvim-java/nvim-java-core',
      'nvim-java/nvim-java-test',
      'nvim-java/nvim-java-dap',
      'MunifTanjim/nui.nvim',
      'neovim/nvim-lspconfig',
      'mfussenegger/nvim-dap',
      {
        'JavaHello/spring-boot.nvim',
        commit = '218c0c26c14d99feca778e4d13f5ec3e8b1b60f0',
      },
      {
        'williamboman/mason.nvim',
        opts = {
          registries = {
            'github:nvim-java/mason-registry',
            'github:mason-org/mason-registry',
          },
        },
      },
      opts = {
        servers = {
          jdtls = {
            settings = {
              java = {
                configuration = {
                  runtimes = {
                    {
                      name = "JavaSE-17",
                      path = "/opt/homebrew/opt/openjdk@17/bin/java",
                      default = true
                    },
                    {
                      name = "JavaSE-11",
                      path = "/opt/homebrew/opt/openjdk@11/bin/java",
                    }
                  }
                }
              },
            },
          },
        },
        setup = {
          jdtls = function()
            require("java").setup()
          end,
        },
      },
    },

When i attempt to run ANY java method provided by the plugin, I get the following error:

 02:25:21 msg_show.lua_error   JavaTestRunCurrentClass Error executing vim.schedule lua callback: ...site/pack/lazy/opt/nvim-java/lua/java/handlers/error.lua:28: 
failed to run the current test class
RPC[Error] code_name = MethodNotFound, message = "No delegateCommandHandler for vscode.java.test.findTestTypesAndMethods"
stack traceback:
	...site/pack/lazy/opt/nvim-java/lua/java/handlers/error.lua:18: in function 'error_handler'
	...ck/lazy/opt/nvim-java-core/lua/java-core/utils/async.lua:32: in function 'callback'
	...nvim-java-core/lua/java-core/ls/clients/jdtls-client.lua:72: in function 'handler'
	.../neovim/0.10.1/share/nvim/runtime/lua/vim/lsp/client.lua:687: in function ''
	vim/_editor.lua: in function <vim/_editor.lua:0>
stack traceback:
	[C]: in function 'error'
	...site/pack/lazy/opt/nvim-java/lua/java/handlers/error.lua:28: in function 'error_handler'
	...ck/lazy/opt/nvim-java-core/lua/java-core/utils/async.lua:32: in function 'callback'
	...nvim-java-core/lua/java-core/ls/clients/jdtls-client.lua:72: in function 'handler'
	.../neovim/0.10.1/share/nvim/runtime/lua/vim/lsp/client.lua:687: in function ''
	vim/_editor.lua: in function <vim/_editor.lua:0>

I have checked and all the plugins have been successfully downloaded, as well as jdtls, java-test and java-debug-adapter.

Steps To Reproduce

  1. Install v2.0.1 of nvim-java
  2. Open java file and attempt to run any of the java commands

Expected Behavior

Expect to see error described in the bug report.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions