Repository navigation
Java support never starts #1970
Copy link
Copy link
Closed
Labels
Description
Since yesterday when running VS Code, I only see a spinner in the lower right corner
. Clicking on it shows an empty "2. Java build status" terminal.
No Java code is compiled, no tests can be run, nothing works and there is no indication anywhere what I can do to either figure out what the problem is or how to fix it.
When starting VS Code a process like this pops up
78632 org.eclipse.equinox.launcher_1.6.100.v20201223-0822.jar
/Library/Java/JavaVirtualMachines/jdk-16.jdk/Contents/Home/bin/java --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Dfile.encoding=utf8 -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -javaagent:/Users/artur/.vscode/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar -jar /Users/artur/.vscode/extensions/redhat.java-0.79.2/server/plugins/org.eclipse.equinox.launcher_1.6.100.v20201223-0822.jar -configuration /Users/artur/Library/Application Support/Code/User/globalStorage/redhat.java/0.79.2/config_ss_mac -data /Users/artur/Library/Application Support/Code/User/workspaceStorage/df9a8c2fd8b4ade43ad4909cfbe736ea/redhat.java/ss_ws
The relevant part of the stack trace for this process seems to be
"main" #1 prio=5 os_prio=31 cpu=1102.34ms elapsed=64.20s tid=0x00007f8237808a00 nid=0x2703 in Object.wait() [0x0000700005d1a000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(java.base@16/Native Method)
- waiting on <0x00000007c0e98b18> (a java.lang.Object)
at java.lang.Object.wait(java.base@16/Object.java:320)
at org.eclipse.jdt.ls.core.internal.LanguageServer.start(LanguageServer.java:33)
- locked <0x00000007c0e98b18> (a java.lang.Object)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@16/Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@16/NativeMethodAccessorImpl.java:78)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@16/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(java.base@16/Method.java:567)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1461)
at org.eclipse.equinox.launcher.Main.main(Main.java:1434)
The only maybe relevant part in the developer tools is
[Extension Host] Error: Unexpected SIGPIPE at process.<anonymous> (/Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap.js:1:370) at process.emit (events.js:315:20)
S @ console.ts:137
In "Open Java Language Server Log File" I see
!ENTRY org.eclipse.jdt.ls.core 4 0 2021-06-05 12:57:59.029
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Error starting module. osgi.identity; type="osgi.bundle"; version:Version="1.1.2.202105191833"; osgi.identity="org.eclipse.jdt.ls.core"; singleton:="true" [id=50]
at org.eclipse.osgi.container.Module.doStart(Module.java:614)
at org.eclipse.osgi.container.Module.start(Module.java:468)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1845)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1838)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1781)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1743)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1665)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/jdt/ls/core/internal/managers/ProjectsManager
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3305)
at java.base/java.lang.Class.getConstructor0(Class.java:3510)
at java.base/java.lang.Class.getConstructor(Class.java:2238)
at org.eclipse.osgi.internal.framework.BundleContextImpl.loadBundleActivator(BundleContextImpl.java:797)
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:749)
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1012)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:366)
at org.eclipse.osgi.container.Module.doStart(Module.java:605)
... 10 more
Caused by: java.lang.ClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.core.resources (23).
at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:126)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:572)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:346)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:401)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:480)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:171)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
... 19 more
Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.core.resources.ResourcesPlugin.start() of bundle org.eclipse.core.resources.
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:835)
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:763)
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1012)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:366)
at org.eclipse.osgi.container.Module.doStart(Module.java:605)
at org.eclipse.osgi.container.Module.start(Module.java:468)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:506)
Environment
- Operating System: macOS
- JDK version: 16
- Visual Studio Code version: 1.56.2
- Java extension version: 0.79.2
Steps To Reproduce
No idea
Reactions are currently unavailable
Activity
Artur- commentedon Jun 5, 2021
Alright, it seems that running "clean java language server workspace" actually fixed the problem. Maybe that could be on top of the troubleshooting page instead of at the bottom?
Feel free to close this issue unless you have ideas on how to fix this from not happening. I doubt I can provide additional information as the problematic workspace state is now deleted.
rgrunber commentedon Jun 7, 2021
To me it looks like something went wrong in org.eclipse.core.resources bundle activator (ResourcesPlugin) with a ClassNotFoundException. Not sure why. With that failing, no core.resources classes would be found on the classpath, so when the language server starts up, ProjectsManager's fails in some static initializer that uses core.resource classes. That causes other classes to fail with NoClassDefFoundError when loading ProjectsManager.
I could imagine issues happening in org.eclipse.core.resources if the language server fails to shutdown the workspace correctly, but I don't see how that would cause a ClassNotFoundException.
Update : Seems partly similar to https://bugs.eclipse.org/bugs/show_bug.cgi?id=361557 .
@fbricon , thoughts on moving the "Clean the workspace directory" instructions to the top of the page in https://github.com/redhat-developer/vscode-java/wiki/Troubleshooting ?
rgrunber commentedon Sep 17, 2021
Moved cleaning the language server workspace to the top, https://github.com/redhat-developer/vscode-java/wiki/Troubleshooting .