vscode-java: Exceptions activating vscode-java extension

Exceptions activating vscode-java extension. The spinning wheel just keeps going in the bottom-right corner.

Environment
  • Operating System: OSX 12.3.1
  • JDK version: embedded into vscode-java
  • Visual Studio Code version: 1.66.1
  • Java extension version: 1.4.0
Steps To Reproduce
  1. Open a Java file
  2. Java spinning wheel spinning in the bottom right corner. Exception in debug output:
rejected promise not handled within 1 second: Error: write EPIPE
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:104
stack trace: Error: write EPIPE
	at WriteWrap.onWriteComplete [as oncomplete] (node:internal[/stream_base_commons:98:16]())
	at WriteWrap.callbackTrampoline (node:internal[/async_hooks:130:17]())
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:104
rejected promise not handled within 1 second: Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:104
stack trace: Error: Cannot call write after a stream was destroyed
	at new NodeError (node:internal[/errors:371:5]())
	at _write (node:internal[/streams/writable:321:11]())
	at Socket.write (node:internal[/streams/writable:334:10]())
	at [/Users/aboyko/.vscode/extensions/redhat.java-1.4.0-darwin-x64/dist/extension.js:2:1014845]()
	at new Promise (<anonymous>)
	at c.write ([/Users/aboyko/.vscode/extensions/redhat.java-1.4.0-darwin-x64/dist/extension.js:2:1014763]())
	at _.doWrite ([/Users/aboyko/.vscode/extensions/redhat.java-1.4.0-darwin-x64/dist/extension.js:2:1004314]())
	at [/Users/aboyko/.vscode/extensions/redhat.java-1.4.0-darwin-x64/dist/extension.js:2:1004209]()
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:104

Test Project: https://github.com/spring-projects/spring-petclinic

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

I just hit by this issue on Windows. Instead of cloning the project to a new location, is there a way to clear the workspace state?

  • Open the command palette (F1)
  • select Java: Clean the Java Language Server Workspace
  • select Restart and delete from the confirmation prompt

@BoykoAlex I still can’t reproduce the issue. Could you set

"java.import.generatesMetadataFilesAtProjectRoot": true,

and send your .project, .classpath files and the .settings folder from the project’s root (spring-petclinic)?