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

"Opening Java Projects" notification never ends #3051

Closed
huco95 opened this issue Apr 9, 2023 · 14 comments
Closed

"Opening Java Projects" notification never ends #3051

huco95 opened this issue Apr 9, 2023 · 14 comments

Comments

@huco95
Copy link

huco95 commented Apr 9, 2023

"Opening Java Projects" notification never ends:
image

If I click on "check details" I can see that the project is opened and the project builiding is correct:
image

Environment
  • Operating System: Window 11
  • JDK version: openjdk version "17.0.5" 2022-10-18
  • Visual Studio Code version: 1.73.1
  • Java extension version: 1.15.0
Steps To Reproduce
  1. install the extension
  2. import a spring boot project
  3. reopen the project

The only error I see on the logs is:

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-04-10 00:04:12.428
!MESSAGE >> workspace/executeCommand sts.java.addClasspathListener

!ENTRY org.springframework.tooling.jdt.ls.extension 1 0 2023-04-10 00:04:12.473
!MESSAGE ClasspathListenerHandler executeCommand sts.java.addClasspathListener, [sts4.classpath.MJnkRbNw]

!ENTRY org.springframework.tooling.jdt.ls.extension 1 0 2023-04-10 00:04:12.484
!MESSAGE ClasspathListenerHandler addClasspathListener sts4.classpath.MJnkRbNw

!ENTRY org.springframework.tooling.jdt.ls.extension 1 0 2023-04-10 00:04:12.488
!MESSAGE ClasspathListenerHandler addClasspathListener sts4.classpath.MJnkRbNw => OK

!ENTRY org.eclipse.jdt.ls.core 1 0 2023-04-10 00:04:12.494
!MESSAGE >> workspace/executeCommand sts.java.removeClasspathListener

!ENTRY org.springframework.tooling.jdt.ls.extension 1 0 2023-04-10 00:04:12.495
!MESSAGE ClasspathListenerHandler executeCommand sts.java.removeClasspathListener, [sts4.classpath.MJnkRbNw]

!ENTRY org.springframework.tooling.jdt.ls.extension 1 0 2023-04-10 00:04:12.496
!MESSAGE ClasspathListenerHandler removeClasspathListener sts4.classpath.MJnkRbNw

!ENTRY org.springframework.tooling.jdt.ls.extension 1 0 2023-04-10 00:04:12.518
!MESSAGE executing callback sts4.classpath.MJnkRbNw FAILED
!ENTRY org.springframework.tooling.jdt.ls.extension 4 0 2023-04-10 00:04:12.519
!MESSAGE org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request workspace/executeClientCommand failed with message: command 'sts4.classpath.MJnkRbNw' not found
!STACK 0
java.util.concurrent.CompletionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request workspace/executeClientCommand failed with message: command 'sts4.classpath.MJnkRbNw' not found
	at java.base/java.util.concurrent.CompletableFuture.reportJoin(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.join(Unknown Source)
	at org.eclipse.jdt.ls.core.internal.JavaClientConnection.executeClientCommand(JavaClientConnection.java:101)
	at org.springframework.tooling.jdt.ls.extension.ClasspathListenerHandler$1.executeClientCommand(ClasspathListenerHandler.java:34)
	at org.springframework.tooling.jdt.ls.commons.classpath.SendClasspathNotificationsJob.bufferMessage(SendClasspathNotificationsJob.java:164)
	at org.springframework.tooling.jdt.ls.commons.classpath.SendClasspathNotificationsJob.run(SendClasspathNotificationsJob.java:146)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request workspace/executeClientCommand failed with message: command 'sts4.classpath.MJnkRbNw' not found
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:209)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:193)
	at org.eclipse.jdt.ls.core.internal.ParentProcessWatcher.lambda$1(ParentProcessWatcher.java:144)
	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)
!ENTRY org.springframework.tooling.jdt.ls.extension 1 0 2023-04-10 00:04:12.565
!MESSAGE executing callback sts4.classpath.MJnkRbNw FAILED
@snjeza
Copy link
Contributor

snjeza commented Apr 9, 2023

@huco95 Can you reproduce the issue if you disable the Spring extensions?

@jdneo
Copy link
Collaborator

jdneo commented Apr 10, 2023

@Eskibear Do you have any idea about this?

@Eskibear
Copy link
Contributor

switch to the pre-release version of spring tools extension. It should be fixed.

@jdneo
Copy link
Collaborator

jdneo commented Apr 10, 2023

Close as it's caused by other extension. Please follow the suggestion.

You can leave comments here if it's not working.

@jdneo jdneo closed this as not planned Won't fix, can't repro, duplicate, stale Apr 10, 2023
@Eskibear
Copy link
Contributor

See spring-projects/sts4#1012 (comment) in case you want to know the details.

@huco95
Copy link
Author

huco95 commented Apr 10, 2023

switch to the pre-release version of spring tools extension. It should be fixed.

I have switch to spring tools pre-release but the issue persists.

@jdneo
Copy link
Collaborator

jdneo commented Apr 11, 2023

cc @BoykoAlex

@Eskibear
Copy link
Contributor

I have switch to spring tools pre-release but the issue persists.

By saying "the issue persists", do you mean: a) "Open java projects" notification never ends. or b) you still see error log like command 'sts4.classpath.MJnkRbNw' not found? Or both?

If b) applies, then I would invite @BoykoAlex to also take a look. Otherwise I assume it might be an issue of jdtls itself and we need to take a further look.

@BoykoAlex
Copy link

BoykoAlex commented Apr 11, 2023

I have just added back log statements in the classpath listener logic on the Boot LS side to help us diagnose issues like this. If ut looks like a b) we'd need the Boot LS log attached here as well.

@huco95
Copy link
Author

huco95 commented Apr 11, 2023

I have switch to spring tools pre-release but the issue persists.

By saying "the issue persists", do you mean: a) "Open java projects" notification never ends. or b) you still see error log like command 'sts4.classpath.MJnkRbNw' not found? Or both?

If b) applies, then I would invite @BoykoAlex to also take a look. Otherwise I assume it might be an issue of jdtls itself and we need to take a further look.

I have check it again and the error log does not show the error anymore. But the notification still never ends.

@BoykoAlex
Copy link

@huco95 Looks like an a) case then. Perhaps try creating a brand new workspace... I recall there was a problem with workspace getting corrupted... perhaps it is that issue.

@huco95
Copy link
Author

huco95 commented Apr 12, 2023

@huco95 Looks like an a) case then. Perhaps try creating a brand new workspace... I recall there was a problem with workspace getting corrupted... perhaps it is that issue.

I have created a new workspace but nothing has changed. The never ending notification is still there and I have those errors in the logs again:

[Error - 22:29:53] 12 abr 2023 22:29:53 org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request workspace/executeClientCommand failed with message: command 'sts4.classpath.oFkeUaFd' not found
org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request workspace/executeClientCommand failed with message: command 'sts4.classpath.oFkeUaFd' not found
java.util.concurrent.CompletionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request workspace/executeClientCommand failed with message: command 'sts4.classpath.oFkeUaFd' not found
	at java.base/java.util.concurrent.CompletableFuture.reportJoin(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.join(Unknown Source)
	at org.eclipse.jdt.ls.core.internal.JavaClientConnection.executeClientCommand(JavaClientConnection.java:101)
	at org.springframework.tooling.jdt.ls.extension.ClasspathListenerHandler$1.executeClientCommand(ClasspathListenerHandler.java:34)
	at org.springframework.tooling.jdt.ls.commons.classpath.SendClasspathNotificationsJob.bufferMessage(SendClasspathNotificationsJob.java:164)
	at org.springframework.tooling.jdt.ls.commons.classpath.SendClasspathNotificationsJob.run(SendClasspathNotificationsJob.java:146)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request workspace/executeClientCommand failed with message: command 'sts4.classpath.oFkeUaFd' not found
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:209)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:193)
	at org.eclipse.jdt.ls.core.internal.ParentProcessWatcher.lambda$1(ParentProcessWatcher.java:144)
	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)

[Error - 22:29:53] 12 abr 2023 22:29:53 org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request workspace/executeClientCommand failed with message: command 'sts4.classpath.oFkeUaFd' not found
org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request workspace/executeClientCommand failed with message: command 'sts4.classpath.oFkeUaFd' not found
java.util.concurrent.CompletionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request workspace/executeClientCommand failed with message: command 'sts4.classpath.oFkeUaFd' not found
	at java.base/java.util.concurrent.CompletableFuture.reportJoin(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.join(Unknown Source)
	at org.eclipse.jdt.ls.core.internal.JavaClientConnection.executeClientCommand(JavaClientConnection.java:101)
	at org.springframework.tooling.jdt.ls.extension.ClasspathListenerHandler$1.executeClientCommand(ClasspathListenerHandler.java:34)
	at org.springframework.tooling.jdt.ls.commons.classpath.SendClasspathNotificationsJob.bufferMessage(SendClasspathNotificationsJob.java:164)
	at org.springframework.tooling.jdt.ls.commons.classpath.SendClasspathNotificationsJob.run(SendClasspathNotificationsJob.java:146)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request workspace/executeClientCommand failed with message: command 'sts4.classpath.oFkeUaFd' not found
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:209)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:193)
	at org.eclipse.jdt.ls.core.internal.ParentProcessWatcher.lambda$1(ParentProcessWatcher.java:144)
	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)

@Eskibear
Copy link
Contributor

@huco95 Uninstall Spring Tools extension, reload the window, see if it gets back to work. If so, we can almost confirm it's due to spring extensions and proceed further analysis e.g. by turning on spring extension's verbose log.

Otherwise please share the sample project if it's ok for you. See if we can reproduce on our side.

@yiiven
Copy link

yiiven commented Jul 24, 2023

I also encountered the same problem. Have you fixed it?

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

6 participants