redhat-developer / redhat-developer/vscode-java
Language server shuts down when attempting to use intellisense
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.3k
- Forks
- 546
- Merge medio
- 20 h 1 min
- PR fusionados (30 d)
- 11
Descripción
I'm running VS Code in a devcontainer, using Colima as the container runtime. Host operating system is MacOS X Ventura 13.5.1, container operating system is Ubuntu 22.04.2 LTS.
I've installed the vscode-java extension using the java devcontainer feature. It's running v1.21.0.
In my environment I have additionally installed IBM Semeru 11.0.20 and 8.0.382. The java language server is configured to use the embedded 17.0.7-linux-x86_64 JRE, and I've specified that explicitly in the java.jdt.ls.java.home setting to attempt to work around this issue.
When clicking around the UI when editing java (e.g. triggering intellisense in a source file) I experience restarts of the language server, where intellisense options disappear, and problems disappear from the problems view. I figure after a while the language server is restarted and I can see intellisense options again.
I've enabled "java.trace.server": "verbose" and consulted the referenced logs in the messages and troubleshooting guides. Here are the relevant excerpts:
From output -> Language Support for java:
[Error - 10:12:10 PM] Client Language Support for Java: connection to server is erroring. Shutting down server.
[Trace - 10:12:10 PM] Sending request 'shutdown - (16)'.
[Error - 10:12:10 PM] Client Language Support for Java: connection to server is erroring. Shutting down server.
[Error - 10:12:10 PM] Client Language Support for Java: connection to server is erroring. Shutting down server.
[Error - 10:12:10 PM] Client Language Support for Java: connection to server is erroring. Shutting down server.
From output -> VS Intellicode:
Error while activating Java: {"code":-32096}. If vscode-java failed to activate, try these troubleshooting steps: https://github.com/redhat-developer/vscode-java/wiki/Troubleshooting
From F1 -> Developer: Toggle developer tools:
log.ts:441 ERR MainThreadFileSystem#$watch(): failed to stat a resource for file watching (extension: vscjava.vscode-java-test, path: ...project1.../src/test/java, recursive: true, session: 0.4090436531869104): EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, stat '...project1.../src/test/java'
23:09:41.197 log.ts:441 ERR MainThreadFileSystem#$watch(): failed to stat a resource for file watching (extension: vscjava.vscode-java-test, path: ...project1.../src/test/resources, recursive: true, session: 0.18483316311899056): EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, stat '...project1.../src/test/resources'
23:09:41.197 log.ts:441 ERR MainThreadFileSystem#$watch(): failed to stat a resource for file watching (extension: vscjava.vscode-java-test, path: ...project2.../src/test/java, recursive: true, session: 0.6391248733455004): EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, stat '...project2.../src/test/java'
23:09:41.197 log.ts:441 ERR MainThreadFileSystem#$watch(): failed to stat a resource for file watching (extension: vscjava.vscode-java-test, path: ...project1.../target/generated-test-sources/test-annotations, recursive: true, session: 0.54014239349779): EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, stat '...project1.../target/generated-test-sources/test-annotations'
23:09:41.198 log.ts:441 ERR MainThreadFileSystem#$watch(): failed to stat a resource for file watching (extension: vscjava.vscode-java-test, path: ...project2.../target/generated-test-sources/test-annotations, recursive: true, session: 0.10929634161612789): EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, stat '...project2.../target/generated-test-sources/test-annotations'
23:09:41.198 log.ts:441 ERR MainThreadFileSystem#$watch(): failed to stat a resource for file watching (extension: vscjava.vscode-java-test, path: ...project3.../src/test/java, recursive: true, session: 0.9882082292151408): EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, stat '...project3.../src/test/java'
23:09:41.198 log.ts:441 ERR MainThreadFileSystem#$watch(): failed to stat a resource for file watching (extension: vscjava.vscode-java-test, path: ...project3.../target/generated-test-sources/test-annotations, recursive: true, session: 0.06354674384256787): EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, stat '...project3.../target/generated-test-sources/test-annotations'
23:09:41.198 log.ts:441 ERR MainThreadFileSystem#$watch(): failed to stat a resource for file watching (extension: vscjava.vscode-java-test, path: ...project3.../src/test/resources'
23:09:41.198 log.ts:441 ERR MainThreadFileSystem#$watch(): failed to stat a resource for file watching (extension: vscjava.vscode-java-test, path: ...project3.../src/test/resources, recursive: true, session: 0.5705465953000592): EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, stat '...project2.../src/test/resources'
None of that looked particularly interesting. All I could tell was that there was some kind of error associated with the language server connection, and that it was shut down. I do experience this quite frequently and repeatedly, but it is intermittent, there doesn't seem to be a specific activity that triggers it. Doubtless it's something to do with the complexity of running everything in a devcontainer.
Any hints where I might find some log with more details of specifically what went wrong with the connection to the language server?
Environment
- Operating System: Mac OS X Ventura 13.5.1
- JDK version: 17.0.7-linux-x86_64
- Visual Studio Code version: 1.81.1
- Java extension version: v1.21.0
Steps To Reproduce
- Run java extension in a devcontainer
- import maven projects automatically on startup
- open a java source file in an imported project and trigger intellisense
- problems view intermittently clears and intellisense stops working until the language server restarts itself
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con la salida de Language Support for Java usando java.trace.server configurado como verbose y luego compárala con los errores de VS Code Developer Tools y las rutas de file-watcher indicadas. El issue se completa cuando se pueda reproducir el cierre intermitente del servidor de lenguaje o identificar su causa con evidencia accionable; no se nombra ningún archivo del repositorio ni ninguna prueba.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java, typescript, vscode
- Área
- devtools
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100