question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

STS4 Java Editor Delays - Classpath Notifications

See original GitHub issue

STS4 Version: 4.1.2.RELEASE Build Id: 201902210640 Eclipse Platform 4.10.0.v20181206-0815 Eclipse Java Development Tools 3.16.0.v20181206-1038

When I edit a .java file, after a few seconds my entire STS environment freezes (including menu items, etc). A few seconds later it resumes, and whatever I typed/deleted appears in the editor. It makes the program basically unusable for Java editing.

I switched on UI Responsiveness Monitoring and can see that when the delay begins, the following data appears in the Error Log:

Plug-in: org.springframework.tooling.ls.eclipse.commons
- Preparing classpath changed notification some.project.name
- exists = true open = true => deleted = false
- classpath=236 entries
- executing callback sts4.classpath.ZwJNwQiO some.project.name false 236
- executing callback sts4.classpath.ZwJNwQiO FAILED

A stack trace is also present:

java.lang.UnsupportedOperationException: No language server has registered to handle command 'sts4.classpath.ZwJNwQiO'
	at org.springframework.tooling.ls.eclipse.commons.LSP4ECommandExecutor.executeClientCommand(LSP4ECommandExecutor.java:42)
	at org.springframework.tooling.jdt.ls.commons.classpath.ReusableClasspathListenerHandler$Subscriptions$2.run(ReusableClasspathListenerHandler.java:179)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Session Data:

eclipse.buildId=4.1.2.201902210640-RELEASE
java.version=1.8.0_202
java.vendor=Amazon.com Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB
Framework arguments:  -product org.springframework.boot.ide.branding.sts4
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.springframework.boot.ide.branding.sts4

There is also this stack trace, output to the Error Log when the UI responsiveness monitoring is triggered:

Stack Trace
    at sun.misc.Unsafe.park(Native Method)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
    at java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1695)
    at java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3323)
    at java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1775)
    at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915)
    at org.eclipse.lsp4e.LanguageServerWrapper.stop(LanguageServerWrapper.java:350)
    at org.eclipse.lsp4e.LanguageServerWrapper.disconnect(LanguageServerWrapper.java:509)
    at org.eclipse.lsp4e.LanguageServerWrapper.stop(LanguageServerWrapper.java:363)
    at org.eclipse.lsp4e.LanguageServerWrapper.start(LanguageServerWrapper.java:184)
    at org.eclipse.lsp4e.LanguageServerWrapper.getInitializedServer(LanguageServerWrapper.java:562)
    at org.eclipse.lsp4e.DocumentContentSynchronizer.documentChanged(DocumentContentSynchronizer.java:89)
    at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged2(AbstractDocument.java:747)
    at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged(AbstractDocument.java:716)
    at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged(AbstractDocument.java:700)
    at org.eclipse.jface.text.AbstractDocument.fireDocumentChanged(AbstractDocument.java:774)
    at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1105)
    at org.eclipse.core.internal.filebuffers.SynchronizableDocument.replace(SynchronizableDocument.java:176)
    at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1123)
    at org.eclipse.core.internal.filebuffers.SynchronizableDocument.replace(SynchronizableDocument.java:164)
    at org.eclipse.jface.text.projection.ProjectionTextStore.replace(ProjectionTextStore.java:106)
    at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1098)
    at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1123)
    at org.eclipse.jface.text.projection.ProjectionDocument.replace(ProjectionDocument.java:628)
    at org.eclipse.jface.text.DefaultDocumentAdapter.replaceTextRange(DefaultDocumentAdapter.java:236)
    at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:7390)
    at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:8254)
    at org.eclipse.swt.custom.StyledText.doContent(StyledText.java:2502)
    at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:6038)
    at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:6069)
    at org.eclipse.swt.custom.StyledText.lambda$1(StyledText.java:5767)
    at org.eclipse.swt.custom.StyledText$$Lambda$329/1187280528.handleEvent(Unknown Source)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1055)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1064)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1106)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1102)
    at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1489)
    at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4888)
    at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:353)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4768)
    at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:348)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4770)
    at org.eclipse.swt.internal.win32.OS.DispatchMessage(Native Method)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3545)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:636)
    at org.eclipse.ui.internal.Workbench$$Lambda$21/510207317.run(Unknown Source)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:563)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:151)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1501)

At the point a .java file is opened (not edited) the following appears in the Console (with Spring Boot Language Server Console enabled):

09:09:44.134 [main] INFO  o.s.i.v.b.a.BootLanguagServerBootApp - Starting BootLanguagServerBootApp v1.4.0-SNAPSHOT on LT-13336 with PID 12552 (C:\cdl_install\sts-4.1.2.RELEASE\configuration\org.eclipse.osgi\620\data\1.4.0.201902210636-spring-boot-language-server-1.4.0-SNAPSHOT.jar started by NeilB in C:\cdl_install\sts-4.1.2.RELEASE)
09:09:44.136 [main] INFO  o.s.i.v.b.a.BootLanguagServerBootApp - No active profile set, falling back to default profiles: default
09:09:44.184 [main] INFO  o.s.c.a.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@71e7a66b: startup date [Fri Mar 15 09:09:44 GMT 2019]; root of context hierarchy
09:09:44.624 [main] INFO  o.s.b.f.a.AutowiredAnnotationBeanPostProcessor - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
09:09:45.227 [main] INFO  o.s.i.v.b.jdt.ls.JdtLsProjectCache - added listener - now listeners registered: 1
09:09:45.478 [main] INFO  o.s.i.v.b.j.utils.SpringSymbolIndex - project listener registered
09:09:45.706 [main] INFO  o.s.j.e.a.AnnotationMBeanExporter - Registering beans for JMX exposure on startup
09:09:45.719 [main] INFO  o.s.i.v.b.a.BootLanguagServerBootApp - Started BootLanguagServerBootApp in 2.663 seconds (JVM running for 3.625)
09:09:45.722 [LanguageServerApp-lifecycle] INFO  o.s.i.v.c.l.LanguageServerRunner - Server ready to start after 3628 ms
09:09:45.724 [LanguageServerApp-lifecycle] INFO  o.s.ide.vscode.commons.util.Log - Starting LS
09:09:45.724 [LanguageServerApp-lifecycle] INFO  o.s.ide.vscode.commons.util.Log - Connected to parent using stdio
09:09:45.785 [pool-3-thread-1] INFO  o.s.i.v.c.l.u.SimpleLanguageServer - Initializing
09:09:45.811 [pool-3-thread-1] INFO  o.s.i.v.c.l.u.SimpleLanguageServer - Returning server capabilities to client: ServerCapabilities [
  textDocumentSync = Either [
    left = Incremental
    right = null
  ]
  hoverProvider = true
  completionProvider = CompletionOptions [
    resolveProvider = true
    triggerCharacters = RegularImmutableList (
      "a",
      "b",
      "c",
      "d",
      "e",
      "f",
      "g",
      "h",
      "i",
      "j",
      "k",
      "l",
      "m",
      "n",
      "o",
      "p",
      "q",
      "r",
      "s",
      "t",
      "u",
      "v",
      "w",
      "x",
      "y",
      "z",
      "A",
      "B",
      "C",
      "D",
      "E",
      "F",
      "G",
      "H",
      "I",
      "J",
      "K",
      "L",
      "M",
      "N",
      "O",
      "P",
      "Q",
      "R",
      "S",
      "T",
      "U",
      "V",
      "W",
      "X",
      "Y",
      "Z",
      "."
    )
  ]
  signatureHelpProvider = null
  definitionProvider = true
  typeDefinitionProvider = null
  implementationProvider = null
  referencesProvider = true
  documentHighlightProvider = true
  documentSymbolProvider = true
  workspaceSymbolProvider = true
  codeActionProvider = Either [
    left = true
    right = null
  ]
  codeLensProvider = CodeLensOptions [
    resolveProvider = false
  ]
  documentFormattingProvider = null
  documentRangeFormattingProvider = null
  documentOnTypeFormattingProvider = null
  renameProvider = null
  documentLinkProvider = null
  colorProvider = null
  foldingRangeProvider = null
  executeCommandProvider = ExecuteCommandOptions [
    commands = SingletonImmutableList (
      "sts.vscode-spring-boot.codeAction"
    )
  ]
  workspace = WorkspaceServerCapabilities [
    workspaceFolders = WorkspaceFoldersOptions [
      supported = true
      changeNotifications = Either [
        left = 7720d750-54a3-477c-a2c7-596d631e65f8
        right = null
      ]
    ]
  ]
  semanticHighlighting = null
  experimental = null
]
09:09:45.854 [Simple-Language-Server main thread] INFO  o.s.i.v.c.l.u.SimpleLanguageServer - Initialization completed after 3760 ms
09:09:46.315 [Simple-Language-Server main thread] INFO  o.s.i.v.b.jdt.ls.JdtLsProjectCache - Project Created: file:/C:/sts-workspace/some.project.name
09:09:46.362 [Simple-Language-Server main thread] INFO  o.s.i.v.b.jdt.ls.JdtLsProjectCache - Classpath has 212 entries 186 source attachements
09:09:46.362 [Simple-Language-Server main thread] INFO  o.s.i.v.b.jdt.ls.JdtLsProjectCache - listeners registered: 1
09:09:46.362 [Simple-Language-Server main thread] INFO  o.s.i.v.b.j.l.JavaProjectsServiceWithFallback - Project created: file:/C:/sts-workspace/some.project.name
09:09:46.363 [Simple-Language-Server main thread] INFO  o.s.i.v.b.j.utils.SpringSymbolIndex - project created event: some.project.name
09:09:46.769 [Simple-Language-Server main thread] INFO  o.s.i.v.b.j.u.SpringLiveHoverWatchdog - project created event: some.project.name
09:09:46.774 [Simple-Language-Server main thread] INFO  o.s.i.v.b.a.BootLanguageServerInitializer - A project changed some.project.name, triggering reconcile on all open documents
09:09:46.999 [Simple-Language-Server main thread] INFO  o.s.i.v.b.jdt.ls.JdtLsProjectCache - Project Created: file:/C:/sts-workspace/hummingbird.rules.demo
09:09:47.090 [Simple-Language-Server main thread] INFO  o.s.i.v.b.jdt.ls.JdtLsProjectCache - Classpath has 238 entries 211 source attachements
09:09:47.090 [Simple-Language-Server main thread] INFO  o.s.i.v.b.jdt.ls.JdtLsProjectCache - listeners registered: 1
09:09:47.090 [Simple-Language-Server main thread] INFO  o.s.i.v.b.j.l.JavaProjectsServiceWithFallback - Project created: file:/C:/sts-workspace/some.different.project
09:09:47.090 [Simple-Language-Server main thread] INFO  o.s.i.v.b.j.utils.SpringSymbolIndex - project created event: some.different.project
==== Process Terminated====

Note that it mentions two different project names even though the java file belongs in some.project.name only (although a file in some.different.project is open in STS at the same time).

In STS3 the same files allow me to edit without issue.

Thanks, Neil

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:22 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
slavapcommented, Apr 19, 2019

@martinlippert I’ve updated to 4.2.1 today and “Ctrl+Click on any java class/method” problem is resolved for me.

1reaction
martinlippertcommented, Apr 12, 2019

@mweirauch Agree, looks indeed not related to anything Spring Tools specific, you should report that to bugs.eclipse.org for sure.

In case you would like to take a look at the log file and search for items, you could also open that file using a random editor of your choice, it should be located at: <workspace>/.metadata/.log.

Read more comments on GitHub >

github_iconTop Results From Across the Web

STS4 Java Editor Delays - Classpath Notifications
When I edit a .java file, after a few seconds my entire STS environment freezes (including menu items, etc). A few seconds later...
Read more >
How To Stop Looping Process "Send Classpath Notification ...
STS4 Java Editor Delays Classpath Notifications #218 When I edit a.java file after a few seconds my entire STS environment freezes. Stack Exchange...
Read more >
Newcomers » Send Classpath Notification slowing down Eclipse
The past few days, suddenly, I see the tool slow down and spinning the wheel. I see that the "Send Classpath Notification" task...
Read more >
Spring Tools 4.6.1 released
Dear Spring Community,. I am happy to announce the 4.6.1 release of the Spring Tools 4 for Eclipse, Visual Studio Code, and Theia....
Read more >
MyEclipse CI Stream Delivery Log - Genuitec
New Editors; Updated Support for Modern Web Frameworks; Server Connectors; Jakarta EE 9; Eclipse 2021-03; Java Enhancements; Spring; Quarkus; OpenShift ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found