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

Gradle build server fails to import project #3449

Closed
jozefcifre opened this issue Jan 2, 2024 · 4 comments
Closed

Gradle build server fails to import project #3449

jozefcifre opened this issue Jan 2, 2024 · 4 comments
Assignees

Comments

@jozefcifre
Copy link

jozefcifre commented Jan 2, 2024

The extension fails on initialization. The pre-release versions get stuck at 30%.
image

Environment
  • Operating System: NixOS
  • JDK version: 17
  • Visual Studio Code version: 1.85.1
  • Java extension version: 1.25.1
Steps To Reproduce
  1. Install the latest release version of this extension.
  2. Open the Java project below.

project reproducing the error
dotlog.txt (.log)
client.log.2024-01-02.txt

Current Result
Expected Result
Additional Informations
@rgrunber
Copy link
Member

It seemed to import successfully using the Gradle support from vscode-java. However, after installing vscjava.vscode-gradle :

!ENTRY org.eclipse.jdt.ls.core 4 0 2024-01-12 15:43:40.456
!MESSAGE Initialization failed 
!STACK 0
java.util.concurrent.CompletionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: java.lang.IllegalArgumentException: java.lang.String is not an interface
	at java.base/java.util.concurrent.CompletableFuture.reportJoin(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.join(Unknown Source)
	at com.microsoft.gradle.bs.importer.GradleBuildServerProjectImporter.importToWorkspace(GradleBuildServerProjectImporter.java:171)
	at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.importProjects(ProjectsManager.java:162)
	at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.initializeProjects(ProjectsManager.java:124)
	at org.eclipse.jdt.ls.core.internal.handlers.InitHandler$1.runInWorkspace(InitHandler.java:263)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:43)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: java.lang.IllegalArgumentException: java.lang.String is not an interface
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:209)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:193)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

com.microsoft.gradle.bs.importer gets contributed into the JDT-LS runtime but it actually comes from :

Looks like the issue happens at https://github.com/microsoft/vscode-gradle/blob/fd041f373c57df32b80c473332d1531e85f4d005/extension/jdtls.ext/com.microsoft.gradle.bs.importer/src/com/microsoft/gradle/bs/importer/GradleBuildServerProjectImporter.java#L171 .

CC'ing @testforstephen for awareness as this is looking like a vscode-gradle issue.

@jozefcifre , if you disable the "Gradle for Java" extension, does the import work ? It seemed to fix it for me.

@rgrunber rgrunber changed the title Initialization failed Gradle build server fails to import project Jan 12, 2024
@testforstephen
Copy link
Collaborator

@jdneo for a look.

@jozefcifre
Copy link
Author

@jozefcifre , if you disable the "Gradle for Java" extension, does the import work ? It seemed to fix it for me.

Yes, It works. Thank you.

@jdneo
Copy link
Collaborator

jdneo commented Jan 18, 2024

The latest pre-release 3.13.2024011802 of the Gradle extension should fix this problem. Please have a try, thank you!

@jdneo jdneo closed this as completed Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants