Skip to content
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

JDTLS fails to start, missing dynamic libs #265

Closed
trev-dev opened this issue Oct 8, 2023 · 0 comments
Closed

JDTLS fails to start, missing dynamic libs #265

trev-dev opened this issue Oct 8, 2023 · 0 comments

Comments

@trev-dev
Copy link

trev-dev commented Oct 8, 2023

I've used coc-java on nixos as recently as 6 months ago without any issues. I fired up my setup today and the language server will not start. It seems to be ignoring my JAVA_HOME setting that's set by the nix developer shell. The included JDK is trying to find some dynamic lib that doesn't exist probably because NixOS doesn't use the standard FSH.

Error:

2023-10-07T20:55:35.016 INFO (pid:118138) [configurations] - Add folder configuration from cwd: /home/trev/Projects/EDUC-INSTITUTE-API/api/.vim/coc-settings.json
2023-10-07T20:55:35.107 INFO (pid:118138) [plugin] - coc.nvim initialized with node: v18.17.1 after �[33m161�[39m
2023-10-07T20:55:35.111 INFO (pid:118138) [services] - LanguageClient nix state change: stopped => starting
2023-10-07T20:55:35.125 INFO (pid:118138) [language-client-index] - Language server "languageserver.nix" started with 118152
2023-10-07T20:55:35.234 INFO (pid:118138) [services] - LanguageClient nix state change: starting => running
2023-10-07T20:55:35.241 INFO (pid:118138) [services] - service languageserver.nix started
2023-10-07T20:55:35.431 ERROR (pid:118138) [server] - unhandledRejection  Promise {
  �[36m<rejected>�[39m Error: Launching server "java" using command /home/trev/.config/coc/extensions/coc-java-data/jdk-17.0.8/javajre-linux-64/jre/bin/java failed.
      at /home/trev/.vim/pack/git/start/coc.nvim/build/index.js:248:6419
      at async Nd.createConnection (/home/trev/.vim/pack/git/start/coc.nvim/build/index.js:244:15252)
      at async Nd._start (/home/trev/.vim/pack/git/start/coc.nvim/build/index.js:244:7748),
  dispose: �[36m[Function (anonymous)]�[39m
} Error: Launching server "java" using command /home/trev/.config/coc/extensions/coc-java-data/jdk-17.0.8/javajre-linux-64/jre/bin/java failed.
    at /home/trev/.vim/pack/git/start/coc.nvim/build/index.js:248:6419
    at async Nd.createConnection (/home/trev/.vim/pack/git/start/coc.nvim/build/index.js:244:15252)
    at async Nd._start (/home/trev/.vim/pack/git/start/coc.nvim/build/index.js:244:7748)
2023-10-07T20:55:41.670 INFO (pid:118138) [attach] - receive notification: openLog []

Output of ldd /home/trev/.config/coc/extensions/coc-java-data/jdk-17.0.8/javajre-linux-64/jre/bin/java:

        linux-vdso.so.1 (0x00007fffe3dc8000)
        libz.so.1 => not found
        libjli.so => /home/trev/.config/coc/extensions/coc-java-data/jdk-17.0.8/javajre-linux-64/jre/bin/../lib/libjli.so (0x00007f974ffb6000)
        libpthread.so.0 => /nix/store/46m4xx889wlhsdj72j38fnlyyvvvvbyb-glibc-2.37-8/lib/libpthread.so.0 (0x00007f974ffb1000)
        libdl.so.2 => /nix/store/46m4xx889wlhsdj72j38fnlyyvvvvbyb-glibc-2.37-8/lib/libdl.so.2 (0x00007f974ffac000)
        libc.so.6 => /nix/store/46m4xx889wlhsdj72j38fnlyyvvvvbyb-glibc-2.37-8/lib/libc.so.6 (0x00007f974fdc6000)
        /lib64/ld-linux-x86-64.so.2 => /nix/store/46m4xx889wlhsdj72j38fnlyyvvvvbyb-glibc-2.37-8/lib64/ld-linux-x86-64.so.2 (0x00007f974ffcd000)
        libz.so.1 => not found

$JAVA_HOME points at: /nix/store/2kksdgp1cq51l7iyw9sl4gywj50mn9is-openjdk-17.0.7+7, the same home that works in Neovim using the built in lsp

@trev-dev trev-dev closed this as not planned Won't fix, can't repro, duplicate, stale Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant