Open delucca opened 4 years ago
Can you provide more details? What does unable to start lsp means? What java version does the project use (JDT LS supports 8+)?
Unable to start lsp means that I cannot run any lsp command, neither autocomplete or other features works.
The project uses OpenJDK 8
@yyoncho I'm having same issue. I tried delete jdt.ls at once and reinstall but got no success.
java -version
openjdk version "13.0.2" 2020-01-14
OpenJDK Runtime Environment (build 13.0.2+8)
OpenJDK 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)
jdtls:stderr
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.gradle.internal.reflect.JavaMethod (file:/Users/sei40kr/.gradle/wrapper/dists/gradle-2.3-all/w01pvxy5gty3tegjrai84pm3/gradle-2.3/lib/gradle-base-services-2.3.jar) to method java.lang.ClassLoader.getPackages()
WARNING: Please consider reporting this to the maintainers of org.gradle.internal.reflect.JavaMethod
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
^ this may have nothing to do with
Hm, I haven't tested with JDK 13 - it may need special adjustments - is this a requirement for you? Did you try to delete the workspace as well?
@yyoncho
Did you try to delete the workspace as well?
I tried and then noticed there're no workspace cache in the directory. (there only exists 2 empty directories)
~/.emacs.d/.local/etc/java-workspace
jdt.ls-java-project/
bin/
src/
lsp-java-workspace-dir
is /Users/sei40kr/.emacs.d/.local/etc/java-workspace
.
lsp-java-workspace-cache-dir
is /Users/sei40kr/.emacs.d/.local/etc/java-workspace/.cache/
.
Also I tried OpenJDK11 and OpenJDK12 (installed with Homebrew) and it didn't work with them too.
Can you provide the client-server logs? Also, what kind of project do you test with? Does it work fine with hello world application like this: https://github.com/emacs-lsp/dap-mode/tree/master/features/fixtures/test-project (if you clone the repo, make sure you pick the proper root in the import project dialog).
@yyoncho
Sorry I don't know how to change the logging verbosity.
I didn't get anything on jdtls
buffer with default verbosity.
I tested the hello world project above and it worked fine.
The project is https://github.com/VaughnVernon/IDDD_Samples. It uses Gradle.
@sei40kr I checked the content of *lsp-log* and there is the following:
Feb 16, 2020, 12:02:52 PM Synchronize Gradle projects with workspace failed due to an error connecting to the Gradle build.
Support for builds using Gradle versions older than 2.6 was removed in tooling API version 5.0. You are currently using Gradle version 2.3. You should upgrade your Gradle build to use Gradle 2.6 or later.
org.gradle.tooling.UnsupportedVersionException: Support for builds using Gradle versions older than 2.6 was removed in tooling API version 5.0. You are currently using Gradle version 2.3. You should upgrade your Gradle build to use Gradle 2.6 or later.
at org.gradle.tooling.internal.consumer.connection.UnsupportedOlderVersionConnection.unsupported(UnsupportedOlderVersionConnection.java:83)
@yyoncho
Sorry, I haven't seen lsp-log and there was a same error as you.
And it seems the gradlew
in the project uses Gradle 2.3.
I removed it and retried, then I got another error:
@sei40kr I have limited understanding about server internals - so if you get an error like that the best place to ask is in the JDT LS repo.
I have a legacy project that I need to work on, the folder structure of the project is like the following:
If I open the project on the root of it, I was unable to even start
lsp
. If I openbusiness
as my root folder, I can initializelsp
correctly, but the code completion wont work.Can anybody help me?