Skip to content

bug: Cannot invoke "org.eclipse.jdt.core.search.SearchPattern.findIndexMatches .... because "pattern" is null #92

@ahakanbaba

Description

@ahakanbaba

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)

NVIM v0.11.1 Build type: Release LuaJIT 2.1.1741730670

Operating system/version

22.04.1-Ubuntu

Describe the bug

I have added this remote debug configuration

    dap.configurations.java = {
        {
            mainClass = '',
            projectName = '',
            name     = "Attach to Gradle bootRun";
            type     = "java";
            request  = "attach";

            -- These two fields are re-used by the adapter definition above:
            hostName = "127.0.0.1";
            port     = 5005;
        },
    }

And running a gradle command with this

./gradlew :bootRun  --debug-jvm

When I try to DapContinue, I get this error

Error executing vim.schedule lua callback: ...e/nvim/lazy/nvim-java-core/lua/java-core/utils/async.lua:41: unhandled error RPC[Error] code_name = UnknownErrorCode, message = "Cannot invoke \"org.eclipse.jdt.core.se
arch.SearchPattern.findIndexMatches(org.eclipse.jdt.internal.core.index.Index, org.eclipse.jdt.internal.core.search.IndexQueryRequestor, org.eclipse.jdt.core.search.SearchParticipant, org.eclipse.jdt.core.search.IJ
avaSearchScope, org.eclipse.core.runtime.IProgressMonitor)\" because \"pattern\" is null" data = {
  message = 'Cannot invoke "org.eclipse.jdt.core.search.SearchPattern.findIndexMatches(org.eclipse.jdt.internal.core.index.Index, org.eclipse.jdt.internal.core.search.IndexQueryRequestor, org.eclipse.jdt.core.searc
h.SearchParticipant, org.eclipse.jdt.core.search.IJavaSearchScope, org.eclipse.core.runtime.IProgressMonitor)" because "pattern" is null'
}
stack traceback:
        [C]: in function 'error'
        ...e/nvim/lazy/nvim-java-core/lua/java-core/utils/async.lua:41: in function 'callback'
        ...nvim-java-core/lua/java-core/ls/clients/jdtls-client.lua:74: in function 'handler'
        /opt/nvim/share/nvim/runtime/lua/vim/lsp/client.lua:682: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

I am relatively new in this jvm development state so, I am not sure where to look at for some debugging. Any tip for help me understand one level detail about this problem would be very appreciated.

Steps To Reproduce

Unfortunately I was not able to reproduce this in a simple project.

With the same attach configuration in dap.configurations.java, I can attach to a simple java application that was started with something like

./gradlew  runJava --debug-jvm

In that java-tutorial simple project, I can successfullly
:DapToggleBreakpoint
and
:DapContinue

I select the attach configuration and stepping, printing all work.

However in a more complex project, I am getting this error.

Expected Behavior

To attach to the remote debugging port and step ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions