Open ewen-r opened 4 years ago
Could you share the language server log file? See the command below to get the log.
F1 -> Open Java language server log file
Looks like something wrong when initialize the workspace:
!ENTRY org.eclipse.core.jobs 4 2 2020-08-06 04:52:27.290
!MESSAGE An internal error occurred during: "Initialize workspace".
!STACK 0
java.lang.NullPointerException
at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer$2.run(JDTLanguageServer.java:297)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
!ENTRY org.eclipse.jdt.ls.core 1 0 2020-08-06 04:53:02.014
!MESSAGE Parent process stopped running, forcing server exit
May not be purely related to switching modes but I also see this trace error in the output. Filenames and paths redacted..
[Error - 3:19:01 AM] Sep 22, 2020, 3:19:01 AM Problem getting outline for XXXXXXXXXXXXXXXXXXX.java _/XXXXXXXXXXXXXXXXXXX [in workroot9591bc80] is not on its project's build path Java Model Exception: Java Model Status [/XXXXXXXXXXXXXXXXXXX/snmp [in workroot_9591bc80] is not on its project's build path] at org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java:583) at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:256) at org.eclipse.jdt.internal.core.Openable.openAncestors(Openable.java:530) at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:250) at org.eclipse.jdt.internal.core.Openable.openAncestors(Openable.java:530) at org.eclipse.jdt.internal.core.CompilationUnit.openAncestors(CompilationUnit.java:1239) at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:250) at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:596) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:326) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:312) at org.eclipse.jdt.internal.core.JavaElement.getChildren(JavaElement.java:267) at org.eclipse.jdt.ls.core.internal.handlers.DocumentSymbolHandler.getHierarchicalOutline(DocumentSymbolHandler.java:133) at org.eclipse.jdt.ls.core.internal.handlers.DocumentSymbolHandler.documentSymbol(DocumentSymbolHandler.java:78) at org.eclipse.jdt.ls.core.internal.syntaxserver.SyntaxLanguageServer.lambda$2(SyntaxLanguageServer.java:278) at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:75) at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642) at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478) at java.base/java.lang.Thread.run(Thread.java:830)
[provide a description of the issue] Starting the server in lightweight mode, then switching to standard mode causes the server to exit after a few minutes.
Environment
Operating System: Linux Mint 4.15.0-112-generic GNU/Linux
JDK version: java --version openjdk 11.0.8 2020-07-14 OpenJDK Runtime Environment (build 11.0.8+10-post-Ubuntu-0ubuntu118.04.1) OpenJDK 64-Bit Server VM (build 11.0.8+10-post-Ubuntu-0ubuntu118.04.1, mixed mode, sharing)
Visual Studio Code version: Version: 1.47.3 Commit: 91899dcef7b8110878ea59626991a18c8a6a1b3e Date: 2020-07-23T15:51:39.791Z Electron: 7.3.2 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Linux x64 4.15.0-112-generic
Java extension version: 0.65.0
Steps To Reproduce
Project is opened with language server in lightweight mode. Server seems to be working fine, messages are being sent and responses are being received OK.
Switch language server to standard mode Server seems to start, only to exit after a few minutes. [Trace - 5:08:38 AM] Sending request 'shutdown - (4)'. [Trace - 5:08:38 AM] Received response 'shutdown - (4)' in 50ms. Result: {}
[Trace - 5:08:38 AM] Sending notification 'exit'. No parameters provided.
[Please attach a sample project reproducing the error] Sorry, unable to do so due to company restrictions.
[Please attach [logs]] -1596705089486.log
Additional Informations