You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error: The Language Support for Java server crashed 5 times in the last 3 minutes. The server will not be restarted. #112
This extension cannot start successfully and popup this error message. I found some logs in the output, hope it can help: [Info - 11:24:22 AM] Connection to server got closed. Server will restart. [Info - 11:24:23 AM] Connection to server got closed. Server will restart. [Warn - 11:24:24 AM] Dec 6, 2016 11:24:24 AM The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. [Info - 11:24:25 AM] Connection to server got closed. Server will restart. [Warn - 11:24:26 AM] Dec 6, 2016 11:24:26 AM The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. [Info - 11:24:26 AM] Connection to server got closed. Server will restart. [Warn - 11:24:27 AM] Dec 6, 2016 11:24:27 AM The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. [Error - 11:24:27 AM] Connection to server got closed. Server will not be restarted.
Can you set java.trace setting to verbose this will dump all the communication between the server and vscode to console. It can give us a hint on what is causing the problem.
!ENTRY org.eclipse.core.resources 2 10035 2016-12-07 22:49:07.452
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
!ENTRY org.eclipse.core.jobs 4 2 2016-12-07 22:49:15.419
!MESSAGE An internal error occurred during: "Initialize Workspace".
!STACK 0
java.lang.NullPointerException
at org.jboss.tools.vscode.java.internal.JavaLanguageServerPlugin.logInfo(JavaLanguageServerPlugin.java:98)
at org.jboss.tools.vscode.java.internal.managers.ProjectsManager.createProject(ProjectsManager.java:66)
at org.jboss.tools.vscode.java.internal.handlers.InitHandler$1.run(InitHandler.java:89)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
!ENTRY org.eclipse.core.resources 4 2 2016-12-07 22:49:15.457
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
java.lang.NullPointerException
at org.eclipse.jdt.internal.launching.LaunchingPlugin.readInstallInfo(LaunchingPlugin.java:1008)
at org.eclipse.jdt.internal.launching.LaunchingPlugin.timeStampChanged(LaunchingPlugin.java:980)
at org.eclipse.jdt.internal.launching.VMDefinitionsContainer.populateVMForType(VMDefinitionsContainer.java:557)
at org.eclipse.jdt.internal.launching.VMDefinitionsContainer.populateVMTypes(VMDefinitionsContainer.java:494)
at org.eclipse.jdt.internal.launching.VMDefinitionsContainer.parseXMLIntoContainer(VMDefinitionsContainer.java:473)
at org.eclipse.jdt.launching.JavaRuntime.addPersistedVMs(JavaRuntime.java:1499)
at org.eclipse.jdt.launching.JavaRuntime.initializeVMs(JavaRuntime.java:2671)
at org.eclipse.jdt.launching.JavaRuntime.getVMInstallTypes(JavaRuntime.java:539)
at org.eclipse.jdt.internal.launching.environments.EnvironmentsManager.initializeCompatibilities(EnvironmentsManager.java:241)
at org.eclipse.jdt.internal.launching.environments.ExecutionEnvironment.init(ExecutionEnvironment.java:181)
at org.eclipse.jdt.internal.launching.environments.ExecutionEnvironment.getDefaultVM(ExecutionEnvironment.java:223)
at org.eclipse.jdt.internal.launching.JREContainerInitializer.resolveVM(JREContainerInitializer.java:176)
at org.eclipse.jdt.internal.launching.JREContainerInitializer.resolveVM(JREContainerInitializer.java:143)
at org.eclipse.jdt.internal.launching.JREContainerInitializer.initialize(JREContainerInitializer.java:60)
at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:2939)
at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1970)
at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3424)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2693)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2857)
at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1962)
at org.eclipse.jdt.internal.core.ExternalFoldersManager.refreshReferences(ExternalFoldersManager.java:393)
at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:1996)
at org.eclipse.jdt.internal.core.DeltaProcessingState.resourceChanged(DeltaProcessingState.java:477)
at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:289)
at org.eclipse.core.internal.events.NotificationManager.handleEvent(NotificationManager.java:273)
at org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:369)
at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1593)
at org.eclipse.core.internal.refresh.RefreshJob.runInWorkspace(RefreshJob.java:163)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
//Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/electron-browser/workbench.main.js:100 The Language Support for Java server crashed 5 times in the last 3 minutes. The server will not be restarted.
I also get this in the Output window:
[Info - 12:44:19 PM] Connection to server got closed. Server will restart.
[Trace - 12:44:20 PM] Sending request 'initialize - (0)'.
Params: {
"processId": 2318,
"rootPath": "/path/to/repo",
"capabilities": {},
"trace": "verbose"
}
I got this to work again by wiping out my repository and forcing it to regenerate all of the eclipse .prefs files. Not sure how any of it got messed up, but it's a workaround at least.
@TechMky Can you find the logs and post them here? they should be in a directory ~/${APP_DATA}/workspaceStorage/${WORKSPACE_HASH}/redhat.java/jdt_ws/.metadata
It looks like the exception thrown while calling JavaLanguageServerPlugin.logInfo is caused by having a null context, which would be caused by the plugin being stopped at that point. So I doubt the exception causes the problem, but is rather a symptom of the server being stopped prematurely.
I have no clue why. Best I can think of right now, is to add some more logging to try to determine what causes the server to stop.
Alright. I'll give it some time and try to generate more log data. I tried making sense of log files but wasn't able to. I hope that the RedHat team can provide me some solution regarding this issue.
@TechMky the Red Hat team (@gorkem and I) have released v0.0.11. This should gives us more logging in case the problem still persists. Please give it a try.
Clean the workspace, either by command prompt or by deleting the "C:\Users\Dhruv\AppData\Roaming\Code\User" Folder. You can find the exact link for the folder in the debug log text.
@fbricon@akaroml it seems this error is constant now. Just tried to open a Java project on WSL and got the same issue. The logs indicate this is the root cause:
{
message: 'Error opening zip file or JAR manifest missing : /home/codespace/.vscode-remote/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar\n',level: 'info',timestamp: '2021-08-31 12:41:43.946'
}
@brunoborges the gabrielbb.vscode-lombok-1.0.1 changes the java.jdt.ls.vmargs value and sets the path to the lombok agent. Either remove it and disable the extension, or install the same extension both locally and on your remote instance
Getting the same error intermittently when working on a remote ubuntu vm from macOS.
It works for some time ok and randomly it just stops working and the language server crashes constantly or can't start at all. Tried cleaning the workspace, removing/reinstalling extensions, reinstalling vscode, killing vscode-server running on the remote end, rebooting the vm, every possible cure I have seen in various issues here, all to no avail. It just starts working by itself after some random time, probably 1-2 days.
The weird thing is that if I create another ubuntu user and connect with vscode through that user, it works fine -for some time, until that breaks too.
The only meaningful log that seems to appear is on the developer tool, which shows the following, just before printing that the language server crashed:
Error: Message header must separate key and value using :
at a.tryReadHeaders (vscode-file://vscode-app/root/.vscode-server/extensions/redhat.java-1.0.0/dist/extension.js:2)
at p.onData (vscode-file://vscode-app/root/.vscode-server/extensions/redhat.java-1.0.0/dist/extension.js:2)
at Socket. (vscode-file://vscode-app/root/.vscode-server/extensions/redhat.java-1.0.0/dist/extension.js:2)
at Socket.emit (events.js:315)
at addChunk (internal/streams/readable.js:309)
at readableAddChunk (internal/streams/readable.js:284)
at Socket.Readable.push (internal/streams/readable.js:223)
at TCP.onStreamRead (internal/stream_base_commons.js:188)
Also you can find the server logs here after enabling trace logs, but don't think there is much to be seen there.
Really could use some help, since this has been torturing me for some days now and can't seem to find anything.
@mmarakas does /home/makis/.vscode-server/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar actually exist? if not, you should remove the lombok javaagent from java.jdt.ls.vmargs
@mmarakas does /home/makis/.vscode-server/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar actually exist? if not, you should remove the lombok javaagent from java.jdt.ls.vmargs
Yes it exists, but even after removing the .vscode-server folder for both root and makis users, the language server still doesn't come up.
I even tried clearing the local vscode storage on macOS at ~/Library/Application Support/Code but nothing changed.
@mmarakas check if VS Code isn't syncing the settings with your account in the cloud somewhere. I kept getting Lombok agent in the vmargs because it was syncing.
For me the fix was removing the javaagent argument which was added to the vmargs in the settings.json .
It's still unclear why this lombar.jar was added. The project I'm working on doesn't use lombok.
Where to find the settings.json.
I'm on Mac so these steps might be a bit different on other system.
Goto Preferences -> Settings
In Settings goto Extensions -> Java
Scroll down and a few of the entries have a link which says Edit in settings.json .
Click on this link to open settings.json .
There should be a key which contains the vmargs: "java.jdt.ls.vmargs"
At the end of the defined value I found the javaagent which pointed to lombok.jar .
Remove this part.
It should now only say something like: "java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m"
After altering this value, VScode will prompt you to restart.
When VScode had restarted the error was gone.
Many workarounds are listed in this issue here, and the NPE regarding logInfo has been fixed. Closing this issue since there's been no activity for years.
Activity
gorkem commentedon Dec 6, 2016
Can you set
java.tracesetting toverbosethis will dump all the communication between the server and vscode to console. It can give us a hint on what is causing the problem.minipotato commentedon Dec 7, 2016
Hi @gorkem ,
I found the log file finally, you can check this:
Thanks
gorkem commentedon Feb 17, 2017
This log indicates that the plugins are not successfully started. I am not sure what can be causing this. Do you still see this behaviour?
DFreds commentedon Feb 22, 2017
This is happening to me as well.
DFreds commentedon Feb 23, 2017
I tried uninstalling and reinstalling the extension and I still get the issue. I also tried restarting my computer and that didn't do anything.
The only thing I can think of is that it was working until I did a Cmd+Shift+W to close code. The next time I started, I got the issue.
Here is the console log output I get in the developer tools.
[Extension Host] Executing /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/java -Declipse.application=org.jboss.tools.vscode.java.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.jboss.tools.vscode.java.product -noverify -Xmx1G -jar /my/username/.vscode/extensions/redhat.java-0.0.10/server/plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar -configuration /my/username/.vscode/extensions/redhat.java-0.0.10/server/config_mac -data /my/username/Library/Application Support/Code/User/workspaceStorage/9fa792d955d2020374db01e716195cb2/redhat.java/jdt_ws
//Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/electron-browser/workbench.main.js:100 The Language Support for Java server crashed 5 times in the last 3 minutes. The server will not be restarted.
I also get this in the Output window:
[Info - 12:44:19 PM] Connection to server got closed. Server will restart.
[Trace - 12:44:20 PM] Sending request 'initialize - (0)'.
Params: {
"processId": 2318,
"rootPath": "/path/to/repo",
"capabilities": {},
"trace": "verbose"
}
DFreds commentedon Feb 23, 2017
I got this to work again by wiping out my repository and forcing it to regenerate all of the eclipse .prefs files. Not sure how any of it got messed up, but it's a workaround at least.
TechMky commentedon Mar 2, 2017
Me too.. I've tried most of the things listed on the Internet and none of them seems to solve this problem.
gorkem commentedon Mar 2, 2017
@TechMky Can you find the logs and post them here? they should be in a directory
~/${APP_DATA}/workspaceStorage/${WORKSPACE_HASH}/redhat.java/jdt_ws/.metadataTechMky commentedon Mar 2, 2017
@gorkem This is what I was able to find
Log.txt
fbricon commentedon Mar 2, 2017
It looks like the exception thrown while calling JavaLanguageServerPlugin.logInfo is caused by having a null context, which would be caused by the plugin being stopped at that point. So I doubt the exception causes the problem, but is rather a symptom of the server being stopped prematurely.
I have no clue why. Best I can think of right now, is to add some more logging to try to determine what causes the server to stop.
TechMky commentedon Mar 3, 2017
@fbricon
Alright. I'll give it some time and try to generate more log data. I tried making sense of log files but wasn't able to. I hope that the RedHat team can provide me some solution regarding this issue.
fbricon commentedon Mar 3, 2017
@TechMky the Red Hat team (@gorkem and I) have released v0.0.11. This should gives us more logging in case the problem still persists. Please give it a try.
fbricon commentedon Mar 3, 2017
Please delete ~/${APP_DATA}/workspaceStorage/, so you get clean logs
TechMky commentedon Mar 3, 2017
Alright. Will do that and let you know.
47 remaining items
dhruvgajwa commentedon Nov 22, 2020
Clean the workspace, either by command prompt or by deleting the "C:\Users\Dhruv\AppData\Roaming\Code\User" Folder. You can find the exact link for the folder in the debug log text.
brunoborges commentedon Aug 31, 2021
@fbricon @akaroml it seems this error is constant now. Just tried to open a Java project on WSL and got the same issue. The logs indicate this is the root cause:
{ message: 'Error opening zip file or JAR manifest missing : /home/codespace/.vscode-remote/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar\n', level: 'info', timestamp: '2021-08-31 12:41:43.946' }fbricon commentedon Aug 31, 2021
@brunoborges the gabrielbb.vscode-lombok-1.0.1 changes the java.jdt.ls.vmargs value and sets the path to the lombok agent. Either remove it and disable the extension, or install the same extension both locally and on your remote instance
brunoborges commentedon Aug 31, 2021
Confirming this was the.issue. thanks!
I think this issue and other similar can be closed.
roccqqck commentedon Oct 22, 2021
It is still happening when I coding in remote container.
But it worked fine when I use local vscode.
mmarakas commentedon Oct 27, 2021
Getting the same error intermittently when working on a remote ubuntu vm from macOS.
It works for some time ok and randomly it just stops working and the language server crashes constantly or can't start at all. Tried cleaning the workspace, removing/reinstalling extensions, reinstalling vscode, killing vscode-server running on the remote end, rebooting the vm, every possible cure I have seen in various issues here, all to no avail. It just starts working by itself after some random time, probably 1-2 days.
The weird thing is that if I create another ubuntu user and connect with vscode through that user, it works fine -for some time, until that breaks too.
The only meaningful log that seems to appear is on the developer tool, which shows the following, just before printing that the language server crashed:
Also you can find the server logs here after enabling trace logs, but don't think there is much to be seen there.
Really could use some help, since this has been torturing me for some days now and can't seem to find anything.
fbricon commentedon Oct 27, 2021
@mmarakas does /home/makis/.vscode-server/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar actually exist? if not, you should remove the lombok javaagent from java.jdt.ls.vmargs
mmarakas commentedon Oct 27, 2021
Yes it exists, but even after removing the .vscode-server folder for both root and makis users, the language server still doesn't come up.
I even tried clearing the local vscode storage on macOS at ~/Library/Application Support/Code but nothing changed.
brunoborges commentedon Oct 27, 2021
@mmarakas check if VS Code isn't syncing the settings with your account in the cloud somewhere. I kept getting Lombok agent in the vmargs because it was syncing.
mhenneke commentedon Jan 20, 2022
For me the fix was removing the javaagent argument which was added to the vmargs in the settings.json .
It's still unclear why this lombar.jar was added. The project I'm working on doesn't use lombok.
Where to find the settings.json.
I'm on Mac so these steps might be a bit different on other system.
Goto Preferences -> Settings
In Settings goto Extensions -> Java
Scroll down and a few of the entries have a link which says Edit in settings.json .
Click on this link to open settings.json .
There should be a key which contains the vmargs: "java.jdt.ls.vmargs"
At the end of the defined value I found the javaagent which pointed to lombok.jar .
Remove this part.
It should now only say something like:
"java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m"After altering this value, VScode will prompt you to restart.
When VScode had restarted the error was gone.
wduminy commentedon May 11, 2022
I had a very similar error on macOS. It might have started happening after I upgraded VS Code.
What worked for me was to delete this directory:
Warning: you will have to set up your workspaces after doing this.
robstryker commentedon Oct 28, 2026
Many workarounds are listed in this issue here, and the NPE regarding logInfo has been fixed. Closing this issue since there's been no activity for years.