Skip to content

bug: Commands related to test not working #461

Open

Description

@dodonut

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.12.0-dev-1769+gd6bee7e407

Operating system/version

linux ubuntu 24.04 e WSL 2.6.2

Describe the bug

I've created a demo application to show the problem. It's a springboot 2.7.1 java 17 with gradle 7.6.
The issue is with the testing, if I run the ./gradlew test it works fine, but the :JavaTestRunCurrentClass (or method) will give me the print that its running bug as soon as I open the test reports I get the error

Image

If I run the :JavatestDebugCurrentMethod (or class) it gives me an error in repl

Image

Steps To Reproduce

  • Download the issue.zip which as my nvim config and the project.
  • Open the test class (only has one)
  • run the commands described above

Expected Behavior

Tests to run and show on viewLastReport and to be able to debug them.

Activity

  1. dodonut commented on Dec 12, 2025

    @dodonut
    Author

    According to my research, the problem is due to the version of jdtls, which in the plugin is 1.54 or 1.43, both are incompatible with spring on 2.7. If I'm right, can someone please tell me? cuz if so, it would be nice a support on the plugin for older versions of spring

  2. s1n7ax commented on Dec 12, 2025

    @s1n7ax
    Member

    nvim-java version?

  3. dodonut commented on Dec 12, 2025

    @dodonut
    Author

    The latest 4.0.4

  4. dodonut commented on Dec 12, 2025

    @dodonut
    Author

    I've tested a little more, and its in fact a spring 2 problem. Generated a https://start.spring.io/ with spring 3 and spring-web dep (and the rest default), and worked just fine, both :JavaTestRun* and :JavaTestDebug*. It would be nice to work with spring 2 as well, cuz I cant update spring on my work environment (still java 8/11 on some projects). Cant be sure if is ONLY a spring problem (not a java 8/11 related as well), since it does not work on java 17 spring 2 but it does in java 17 spring 3.

  5. s1n7ax commented on Dec 14, 2025

    @s1n7ax
    Member

    @dodonut You can use the previous version 1.43.0 of jdtls. Other working versions will be set automatically. I won't be able to look into this for some time.
    https://github.com/nvim-java/nvim-java?tab=readme-ov-file#wrench-configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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