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

java.lang.String is not an interface #1431

Closed
pablocarle opened this issue Oct 17, 2023 · 3 comments
Closed

java.lang.String is not an interface #1431

pablocarle opened this issue Oct 17, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@pablocarle
Copy link

Initially reported in redhat-developer/vscode-java#3342

Extension Name: vscode-gradle
Extension Version: 3.13.0
OS Version: MacOS Ventura
VSCode version:

Version: 1.83.1
Commit: f1b07bd25dfad64b0167beb15359ae573aecd2cc
Date: 2023-10-10T23:46:55.789Z
Electron: 25.8.4
ElectronBuildId: 24154031
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Darwin x64 22.6.0

Describe the bug
Enabling this extension together with the java language server from redhat results in the latter failing.
Also seems to be avoided by disabling java.gradle.buildServer.enabled

Does the bug still exist if you disable all other extensions?
No

Additional context

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-10-16 17:07:49.855
!MESSAGE Non-Static Commands: [java.maven.initializeSearcher, java.maven.searchArtifact, java.maven.addDependency, java.maven.controlContext]

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-10-16 17:07:49.882
!MESSAGE RepositoryRegistryUpdateJob finished 0ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-10-16 17:07:49.905
!MESSAGE >> initialized

!ENTRY org.eclipse.jdt.ls.core 4 0 2023-10-16 17:08:10.331
!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(CompletableFuture.java:413)
	at java.base/java.util.concurrent.CompletableFuture.join(CompletableFuture.java:2118)
	at com.microsoft.gradle.bs.importer.GradleBuildServerProjectImporter.importToWorkspace(GradleBuildServerProjectImporter.java:105)
	at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.importProjects(ProjectsManager.java:152)
	at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.initializeProjects(ProjectsManager.java:114)
	at org.eclipse.jdt.ls.core.internal.handlers.InitHandler$1.runInWorkspace(InitHandler.java:260)
	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(Executors.java:577)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1623)

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-10-16 17:08:10.378
!MESSAGE >> initialization job finished

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-10-16 17:08:10.384
!MESSAGE >> registerWatchers'

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-10-16 17:08:10.387
!MESSAGE >> registerFeature 'workspace/didChangeWatchedFiles'

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-10-16 17:08:10.767
!MESSAGE >> build jobs finished
@jdneo
Copy link
Member

jdneo commented Oct 17, 2023

@pablocarle Is it possible to share a sample project to us?

@pablocarle
Copy link
Author

@pablocarle Is it possible to share a sample project to us?

Hi, this is an open source project I work on that constantly has this issue https://github.com/zowe/api-layer . It only works (with both extensions) when it's a clean open, so a fresh start should work fine, but then a restart of vscode triggers the issue. I just tried it on a fresh git clone.

Disabling the gradle extension fixes the issue on opening (as it keeps on looping forever)

Once the Language Support for Java extension finishes loading I can enable the gradle extension once again and everything is fine.

@jdneo
Copy link
Member

jdneo commented Jan 18, 2024

The latest pre-release 3.13.2024011802 should fix this problem. Please have a try.

@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
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants