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
Boot Properties Editor Code Completions not work #164
I'm working with exactly the same CI build on mac OSX: spring-tool-suite-4-4.1.0.CI-B1407-e4.10.0-macosx.cocoa.x86_64.dmg
Code completions work for me when i edit application.yml.
Is your file names application.yml and located under src/main/resources in your boot maben project?
Did you open the application.yml file with Generic Editor:
Close STS4
Run jps command in the console
Check if you have any processes like that: 29173 1.1.0.201810300740-spring-boot-language-server-1.1.0-SNAPSHOT.jar
Kill them manually: kill -6 <pid>
Open STS
Close all editors
Open preferences and check-mark Spring Boot here:
Open the YAML and try content assists again
The console view would show the language server log. If CA is not working still attach the contents of the console view here.
Also check for various lsp4e or sts errors in the error view.
11:33:11.742 [main] INFO o.s.i.v.b.a.BootLanguagServerBootApp - No active profile set, falling back to default profiles: default
11:33:11.817 [main] INFO o.s.c.a.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@387c703b: startup date [Thu Dec 13 11:33:11 CST 2018]; root of context hierarchy
11:33:12.604 [main] INFO o.s.b.f.a.AutowiredAnnotationBeanPostProcessor - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
11:33:13.869 [main] INFO o.s.j.e.a.AnnotationMBeanExporter - Registering beans for JMX exposure on startup
11:33:13.893 [main] INFO o.s.i.v.b.a.BootLanguagServerBootApp - Started BootLanguagServerBootApp in 3.209 seconds (JVM running for 4.121)
11:33:13.896 [LanguageServerApp-lifecycle] INFO o.s.i.v.c.l.LanguageServerRunner - Server ready to start after 4125 ms
11:33:13.899 [LanguageServerApp-lifecycle] INFO o.s.ide.vscode.commons.util.Log - Starting LS
11:33:13.900 [LanguageServerApp-lifecycle] INFO o.s.ide.vscode.commons.util.Log - Connected to parent using stdio
11:33:14.013 [pool-3-thread-1] INFO o.s.i.v.c.l.u.SimpleLanguageServer - Initializing
11:33:14.028 [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 = null
]
signatureHelpProvider = null
definitionProvider = true
typeDefinitionProvider = null
implementationProvider = null
referencesProvider = true
documentHighlightProvider = true
documentSymbolProvider = true
workspaceSymbolProvider = true
codeActionProvider = null
codeLensProvider = CodeLensOptions [
resolveProvider = false
]
documentFormattingProvider = null
documentRangeFormattingProvider = null
documentOnTypeFormattingProvider = null
renameProvider = null
documentLinkProvider = null
colorProvider = null
executeCommandProvider = null
workspace = WorkspaceServerCapabilities [
workspaceFolders = WorkspaceFoldersOptions [
supported = true
changeNotifications = Either [
left = 2c8c4fa1-bd9c-428b-b176-cb967426fa16
right = null
]
]
]
experimental = null
]
11:33:14.113 [SimpleLanguaserver main thread] INFO o.s.i.v.c.l.u.SimpleLanguageServer - Initialization completed after 4341 ms
11:33:16.093 [pool-3-thread-1] WARN o.e.lsp4j.jsonrpc.RemoteEndpoint - Unmatched cancel notification for request id 4
11:33:19.165 [SimpleLanguaserver main thread] INFO o.s.i.v.b.jdt.ls.JdtLsProjectCache - Project Created: file:/Users/tsing/Documents/workspace-spring-tool-suite-4-4.10/demo-2
11:33:19.169 [SimpleLanguaserver main thread] INFO o.s.i.v.b.jdt.ls.JdtLsProjectCache - Classpath has 76 entries 32 source attachements
11:33:19.170 [SimpleLanguaserver main thread] INFO o.s.i.v.b.a.BootLanguageServerInitializer - A project changed demo-2, triggering reconcile on all open documents
11:33:19.213 [Reconciler-1] INFO o.s.ide.vscode.commons.util.Log - Indexing Spring Boot Properties for demo-2
11:33:19.247 [SimpleLanguaserver main thread] INFO o.s.i.v.b.jdt.ls.JdtLsProjectCache - Project Created: file:/Users/tsing/Documents/workspace-spring-tool-suite-4-4.10/demo
11:33:19.253 [SimpleLanguaserver main thread] INFO o.s.i.v.b.jdt.ls.JdtLsProjectCache - Classpath has 84 entries 56 source attachements
11:33:19.253 [SimpleLanguaserver main thread] INFO o.s.i.v.b.a.BootLanguageServerInitializer - A project changed demo, triggering reconcile on all open documents
11:33:19.605 [Reconciler-1] INFO o.s.ide.vscode.commons.util.Log - Indexing Spring Boot Properties for demo-2 DONE
11:33:19.605 [Reconciler-1] INFO o.s.ide.vscode.commons.util.Log - Indexed 1007 properties.
This is most often caused by a problem with your internet connection. Please check your internet connection and retry.
!STACK 1
org.eclipse.core.runtime.CoreException: Connection failed
This is most often caused by a problem with your internet connection. Please check your internet connection and retry.
at org.eclipse.epp.internal.mpc.core.transport.httpclient.HttpClientTransport.stream(HttpClientTransport.java:119)
at org.eclipse.epp.internal.mpc.core.util.FallbackTransportFactory$FallbackTransport.stream(FallbackTransportFactory.java:71)
at org.eclipse.epp.internal.mpc.core.service.RemoteMarketplaceService.processRequest(RemoteMarketplaceService.java:165)
at org.eclipse.epp.internal.mpc.core.service.RemoteMarketplaceService.processRequest(RemoteMarketplaceService.java:130)
at org.eclipse.epp.internal.mpc.core.service.RemoteMarketplaceService.processRequest(RemoteMarketplaceService.java:117)
at org.eclipse.epp.internal.mpc.core.service.DefaultCatalogService.listCatalogs(DefaultCatalogService.java:53)
at org.eclipse.epp.internal.mpc.ui.commands.AbstractMarketplaceWizardCommand.lambda$0(AbstractMarketplaceWizardCommand.java:168)
at org.eclipse.epp.internal.mpc.ui.commands.AbstractMarketplaceWizardCommand$$Lambda$686/210616815.run(Unknown Source)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to 127.0.0.1:61910 [/127.0.0.1] failed: Connection refused
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:159)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:389)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at org.apache.http.client.fluent.Request.internalExecute(Request.java:173)
at org.apache.http.client.fluent.Executor.execute(Executor.java:262)
at org.eclipse.epp.internal.mpc.core.transport.httpclient.HttpClientTransport.execute(HttpClientTransport.java:93)
at org.eclipse.epp.internal.mpc.core.transport.httpclient.RequestTemplate.executeImpl(RequestTemplate.java:96)
at org.eclipse.epp.internal.mpc.core.transport.httpclient.RequestTemplate.execute(RequestTemplate.java:55)
at org.eclipse.epp.internal.mpc.core.transport.httpclient.HttpClientTransport.stream(HttpClientTransport.java:104)
... 8 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:75)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
... 23 more
Contains: Connection failed
@cenggel The log output from the console looks fine to me, nothing in there that looks like an error or like something is going wrong. The error from the Error Log seems to come from the Marketplace Client in Eclipse, so also not related to the property editing. Looks like we need to dive deeper to find the root cause for this.
Can you attach (or point us to) a sample project that reproduces the error?
And what happens exactly when you hit Ctrl-Space in the editor? Just plain nothing?
One thing that I noticed is that your example screenshot from 3.9.x is for a .properties file where you use the notion server.port=8000 (for example), whereas you are editing an application.YML file in the other case with a quite unusual notion for YAML. This should not break the content-assist (I tried it and it should just work), but the notion is still unusual for YAML. The server port would usually look like:
Did you launch your STS with Java 11? Do you have any errors on you project?
I'd make sure that STS is launched with Java 8 and when you run Maven -> Update Project... action non errors on the project shown.
If you have any errors with your project classpath then STS4 tooling may not recognize your project as Spring Boot project and hence there won't be any content assists or any other features working with the Boot properties YAML file
At first I didn't get any content assist as well, but that was because i had maven problems on the project which i fixed by running STS with Java 8 (M2E doesn't seem to be working with Java 11). Then everything worked with your project.
I upgrade jdk to java version "1.8.0_191" reinstall my sts4 create new workspace and new boot project . But nothing changed . Code completions also not work for me.
@cenggel this is really strange, since everything looks like it should just work... :-( What happens if you create and open a file called application.properties in your demo project and open that? Is content-assist showing up there?
I also tried your demo project with the latest STS4 CI distribution build and the content-assist shows up just fine for the application.yml file. It takes a while when you invoke it for the first time, since it indexes stuff from the classpath, but it works. Maybe something is timing out in your case.
What happens if you enter string value for server.port=qqqq in properties or whatever it translates to yaml... do you get the red squiggly line under "qqqq"?
Do you see the live hints when If you start your demo boot app? @SpringBootApplication gets greenish background in the Java editor, if you hover over it you'd get some info about live running app. Does this work? Just curious if it is just the CA or everything...
Also, I'm very curious if it all works with VSCode rather than Eclipse on your system. Are you familiar with VSCode? It has the same Spring Boot extension that will allow to edit application.yml and application.properties files... https://code.visualstudio.com/download
Once downloaded, open it, then open the demo project folder via File menu.
Note the vertical toolbar on the left. The bottom button is extensions. Click it. Type spring boot in the text box. The first 2 extensions in the list would be: Spring Boot Tools and Spring Boot Extension Pack (the second has a number of extensions including the first one). Once installed VSCode would prompt you to reload the window. Reload it. Then open the applicationn.yml and try to work with it.
Maybe it has to do something with the OS... but at first sight it looks like the language server process works for some features like linting and not working for others like content assists...
One more thing to try in Eclipse STS: Press Cmd-6. This should produce a list of Spring workspace symbols (beans, request mappings, various annotations). Do you see stuff from your demo project in that list?
Unfortunately, so far it seems like some debugging on your system would be necessary to get to the bottom of this... We'd have to come up with instructions for you... Think the easiest would be debugging Language Server with VSCode...
Live hovers not working may be because they require spring-boot-actuator on the project. But this is not the case for content assist, that should work regardless.
What is really puzzling here is that you get the squigly line and information hover for the properties. This means that the property metadata is definitely known to the language server meaning it seems to be all working fine in that regards. But the content-assist, which is based on the same information, does not work. Now that is strange.
Perhaps it might be a thread that is 'stuck' in a deadlock or something like that. If you could try to use jps and jstack to collect a stacktrace from the language server process and attach it here maybe it can show something interesting.
If you use jps you can get a list of java processes. The language server will look something like this:
Cmd+6 quick navigating spring symbols both working on eclipse and vscode .
I have add the spring-boot-actuator in pom.xml . When I not added spring-boot-actuator dependency mouse hover on @SpringBootApplication have hint to say live hint need spring-boot-actuator .
2018-12-21 08:58:13
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.191-b12 mixed mode):
"pool-2-thread-1" #24 prio=5 os_prio=31 tid=0x00007fdda75f4000 nid=0x1507 waiting on condition [0x0000700001b67000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000007806547b0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
"parallel-2" #23 daemon prio=5 os_prio=31 tid=0x00007fdda76a5000 nid=0x6103 waiting on condition [0x0000700001a64000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000007808bd6c0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1081)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
"elastic-2" #22 daemon prio=5 os_prio=31 tid=0x00007fdda3fbf000 nid=0x5f03 waiting on condition [0x0000700001961000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000007808be8b8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1081)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
"parallel-1" #21 daemon prio=5 os_prio=31 tid=0x00007fdda374d000 nid=0x3507 waiting on condition [0x000070000185e000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000007808bdb68> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1081)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
"Attach Listener" #20 daemon prio=9 os_prio=31 tid=0x00007fdda30fc000 nid=0x5d03 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Reconciler-1" #19 daemon prio=5 os_prio=31 tid=0x00007fdda673c800 nid=0x5b03 waiting on condition [0x0000700001658000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000007803cab60> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1081)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
"elastic-evictor-1" #18 daemon prio=5 os_prio=31 tid=0x00007fdda528f800 nid=0x5903 waiting on condition [0x0000700001555000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000007808bf188> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
"Timer-0" #17 prio=5 os_prio=31 tid=0x00007fdda60c0000 nid=0x5703 in Object.wait() [0x0000700001452000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x000000078067c398> (a java.util.TaskQueue)
at java.util.TimerThread.mainLoop(Timer.java:552)
- locked <0x000000078067c398> (a java.util.TaskQueue)
at java.util.TimerThread.run(Timer.java:505)
"SimpleLanguaserver main thread" #16 daemon prio=5 os_prio=31 tid=0x00007fdda3bea800 nid=0x5503 waiting on condition [0x000070000134f000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x0000000780495ba0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1081)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
"pool-3-thread-1" #15 prio=5 os_prio=31 tid=0x00007fdda7226800 nid=0x5303 runnable [0x000070000124c000]
java.lang.Thread.State: RUNNABLE
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:255)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
- locked <0x00000007800f4738> (a java.io.BufferedInputStream)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:75)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:95)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
"DestroyJavaVM" #14 prio=5 os_prio=31 tid=0x00007fdda5f64800 nid=0x1703 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"LanguageServerApp-lifecycle" #13 prio=5 os_prio=31 tid=0x00007fdda5ec1800 nid=0x510b waiting on condition [0x0000700001149000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x0000000780adca48> (a java.util.concurrent.FutureTask)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:429)
at java.util.concurrent.FutureTask.get(FutureTask.java:191)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor$1.get(ConcurrentMessageProcessor.java:44)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor$1.get(ConcurrentMessageProcessor.java:40)
at org.springframework.ide.vscode.commons.languageserver.LanguageServerRunner.startAsClient(LanguageServerRunner.java:139)
at org.springframework.ide.vscode.commons.languageserver.LanguageServerRunner.start(LanguageServerRunner.java:94)
at org.springframework.ide.vscode.commons.languageserver.LanguageServerRunner.lambda$run$0(LanguageServerRunner.java:61)
at org.springframework.ide.vscode.commons.languageserver.LanguageServerRunner$$Lambda$265/1634132079.run(Unknown Source)
at java.lang.Thread.run(Thread.java:748)
"Service Thread" #8 daemon prio=9 os_prio=31 tid=0x00007fdda3000800 nid=0x4903 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C1 CompilerThread2" #7 daemon prio=9 os_prio=31 tid=0x00007fdda202e800 nid=0x4703 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread1" #6 daemon prio=9 os_prio=31 tid=0x00007fdda202e000 nid=0x4503 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread0" #5 daemon prio=9 os_prio=31 tid=0x00007fdda3844000 nid=0x4303 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" #4 daemon prio=9 os_prio=31 tid=0x00007fdda3858800 nid=0x3713 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" #3 daemon prio=8 os_prio=31 tid=0x00007fdda2027000 nid=0x3003 in Object.wait() [0x000070000092e000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0000000780008e98> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)
- locked <0x0000000780008e98> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:165)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:216)
"Reference Handler" #2 daemon prio=10 os_prio=31 tid=0x00007fdda2004000 nid=0x2e03 in Object.wait() [0x000070000082b000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0000000780008ed8> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:502)
at java.lang.ref.Reference.tryHandlePending(Reference.java:191)
- locked <0x0000000780008ed8> (a java.lang.ref.Reference$Lock)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)
"VM Thread" os_prio=31 tid=0x00007fdda383e000 nid=0x2c03 runnable
"GC task thread#0 (ParallelGC)" os_prio=31 tid=0x00007fdda3803800 nid=0x2403 runnable
"GC task thread#1 (ParallelGC)" os_prio=31 tid=0x00007fdda2810800 nid=0x2603 runnable
"GC task thread#2 (ParallelGC)" os_prio=31 tid=0x00007fdda2811800 nid=0x2803 runnable
"GC task thread#3 (ParallelGC)" os_prio=31 tid=0x00007fdda3002800 nid=0x2a03 runnable
"VM Periodic Task Thread" os_prio=31 tid=0x00007fdda2832000 nid=0x4b03 waiting on condition
JNI global references: 979
Nothing suspicious looking in the stack dump. So unfortunately that didn't help :-(
I'm thinking something may be wrong on the Eclipse side. I suspect something to do with how lsp4e enables functionality based on document content types. I vaguely remember in the past that reconcile don't follow the same rules as completions and hovers. Is your file called 'applition.yml' or is it something else like 'application-development.yml'?
My friend run spring-tool-suite-4-4.1.0.RELEASE-e4.10.0-win32.win32.x86_64.zip on win10 and java 8 , when edit application.yml content-assist not showing up .
OK, maybe this is a stupid thought, but are you talking about content-assist not showing up AUTOMATICALLY while typing something or after typing . ?!?
That happens in STS3, but not in the STS4 editors. In the STS4 editors you have to invoke the content-assist manually by pressing CTRL+Space. Are you talking about this difference?
@martinlippert Thanks for your replay! I found the content-assist showing up key is not CTRL+Space , in my eclipse default binding to ALT+/ so when press CTRL+Space can't showing content-assist.
How to AUTOMATICALLY showing up content-assist in the STS4 editors ?It is possible ?
@cenggel Just to verify, you can get content-assist to show up for property files on your end by using the content-assist key binding that is configured on your install, right?
If so, we should close this issue and open a new one for the "show content-assist automatically", which should certainly be possible to implement. Agree?
Activity
BoykoAlex commentedon Dec 12, 2018
I'm working with exactly the same CI build on mac OSX:
spring-tool-suite-4-4.1.0.CI-B1407-e4.10.0-macosx.cocoa.x86_64.dmgCode completions work for me when i edit

application.yml.Is your file names
application.ymland located undersrc/main/resourcesin your boot maben project?Did you open the
application.ymlfile with Generic Editor:cenggel commentedon Dec 13, 2018
Thanks for @BoykoAlex replay.
Yes, I did it but code completion not appeared.
sts3.9.2 completion works fine
How can I check what wrong for my environment ?
BoykoAlex commentedon Dec 13, 2018
Close STS4

Run
jpscommand in the consoleCheck if you have any processes like that:
29173 1.1.0.201810300740-spring-boot-language-server-1.1.0-SNAPSHOT.jarKill them manually:
kill -6 <pid>Open STS
Close all editors
Open preferences and check-mark Spring Boot here:
Open the YAML and try content assists again
The console view would show the language server log. If CA is not working still attach the contents of the console view here.
Also check for various lsp4e or sts errors in the error view.
cenggel commentedon Dec 14, 2018
console log :
jps :
32886 1.2.0.201812112357-spring-boot-language-server-1.2.0-SNAPSHOT.jarcenggel commentedon Dec 14, 2018
have error log
martinlippert commentedon Dec 14, 2018
@cenggel The log output from the console looks fine to me, nothing in there that looks like an error or like something is going wrong. The error from the Error Log seems to come from the Marketplace Client in Eclipse, so also not related to the property editing. Looks like we need to dive deeper to find the root cause for this.
Can you attach (or point us to) a sample project that reproduces the error?
And what happens exactly when you hit Ctrl-Space in the editor? Just plain nothing?
One thing that I noticed is that your example screenshot from 3.9.x is for a .properties file where you use the notion
server.port=8000(for example), whereas you are editing an application.YML file in the other case with a quite unusual notion for YAML. This should not break the content-assist (I tried it and it should just work), but the notion is still unusual for YAML. The server port would usually look like:cenggel commentedon Dec 17, 2018
3.9.x YAML works too:

When I hit Ctrl+Space in editor not happend any thing.
my demo is just create a simple spring boot project. attached by demo-2.zip
demo-2.zip
Thanks @martinlippert & @BoykoAlex .
BoykoAlex commentedon Dec 17, 2018
Did you launch your STS with Java 11? Do you have any errors on you project?
I'd make sure that STS is launched with Java 8 and when you run
Maven -> Update Project...action non errors on the project shown.If you have any errors with your project classpath then STS4 tooling may not recognize your project as Spring Boot project and hence there won't be any content assists or any other features working with the Boot properties YAML file
At first I didn't get any content assist as well, but that was because i had maven problems on the project which i fixed by running STS with Java 8 (M2E doesn't seem to be working with Java 11). Then everything worked with your project.
cenggel commentedon Dec 17, 2018
STS launched by java 8
and not have any errors for project.
Which version of java 8 you used?
My java version is :
BoykoAlex commentedon Dec 17, 2018
This is old JDK. Try use the latest JDK. Mine is not latest, quite old, but it's 1.8.0_151
cenggel commentedon Dec 17, 2018
I upgrade jdk to
java version "1.8.0_191"reinstall my sts4 create new workspace and new boot project . But nothing changed . Code completions also not work for me.martinlippert commentedon Dec 17, 2018
@cenggel this is really strange, since everything looks like it should just work... :-( What happens if you create and open a file called
application.propertiesin your demo project and open that? Is content-assist showing up there?cenggel commentedon Dec 18, 2018
@martinlippert edit
application.propertiesin my demo project content-assist not showing up too .martinlippert commentedon Dec 18, 2018
Can you paste the content of your SpringTools4.ini file? Just guessing around, since I am running out of ideas here.
martinlippert commentedon Dec 18, 2018
I also tried your demo project with the latest STS4 CI distribution build and the content-assist shows up just fine for the
application.ymlfile. It takes a while when you invoke it for the first time, since it indexes stuff from the classpath, but it works. Maybe something is timing out in your case.From what I can observe is that the log output from the language server (once you enabled that in the preferences), it shows additional output right after you hit content-assist for the first time in that application.yml file. Can you double check that? Maybe with a fresh STS4 install from the CI builds at http://dist.springsource.com/snapshot/STS4/nightly-distributions.html, using the latest version on Eclipse 4.10? Can you try that?
I am sorry for this taking so long to debug, seems like a really strange and hard-to-diagnose issue...
2 remaining items
BoykoAlex commentedon Dec 20, 2018
What happens if you enter string value for
server.port=qqqqin properties or whatever it translates to yaml... do you get the red squiggly line under "qqqq"?Do you see the live hints when If you start your demo boot app?
@SpringBootApplicationgets greenish background in the Java editor, if you hover over it you'd get some info about live running app. Does this work? Just curious if it is just the CA or everything...Also, I'm very curious if it all works with VSCode rather than Eclipse on your system. Are you familiar with VSCode? It has the same Spring Boot extension that will allow to edit
application.ymlandapplication.propertiesfiles...https://code.visualstudio.com/download
Once downloaded, open it, then open the
demoproject folder viaFilemenu.Note the vertical toolbar on the left. The bottom button is extensions. Click it. Type
spring bootin the text box. The first 2 extensions in the list would be:Spring Boot ToolsandSpring Boot Extension Pack(the second has a number of extensions including the first one). Once installed VSCode would prompt you to reload the window. Reload it. Then open theapplicationn.ymland try to work with it.cenggel commentedon Dec 20, 2018
server.port: aaacan get red squiggly line under "aaa" . like belowI can't see live hints when I start my project.

cenggel commentedon Dec 20, 2018
I download vscode and install spring boot tools , when edit yaml file have validation but content-assist can't shown up .
When start project live application information hovers can't work .
It is my os problem ?
BoykoAlex commentedon Dec 20, 2018
Maybe it has to do something with the OS... but at first sight it looks like the language server process works for some features like linting and not working for others like content assists...
One more thing to try in Eclipse STS: Press
Cmd-6. This should produce a list of Spring workspace symbols (beans, request mappings, various annotations). Do you see stuff from your demo project in that list?Unfortunately, so far it seems like some debugging on your system would be necessary to get to the bottom of this... We'd have to come up with instructions for you... Think the easiest would be debugging Language Server with VSCode...
kdvolder commentedon Dec 20, 2018
Live hovers not working may be because they require spring-boot-actuator on the project. But this is not the case for content assist, that should work regardless.
What is really puzzling here is that you get the squigly line and information hover for the properties. This means that the property metadata is definitely known to the language server meaning it seems to be all working fine in that regards. But the content-assist, which is based on the same information, does not work. Now that is strange.
Perhaps it might be a thread that is 'stuck' in a deadlock or something like that. If you could try to use
jpsandjstackto collect a stacktrace from the language server process and attach it here maybe it can show something interesting.If you use jps you can get a list of java processes. The language server will look something like this:
Note the process-id (
32188here). Then run commandjstack 32188.cenggel commentedon Dec 21, 2018
Cmd+6 quick navigating spring symbols both working on eclipse and vscode .
I have add the
spring-boot-actuatorin pom.xml . When I not addedspring-boot-actuatordependency mouse hover on@SpringBootApplicationhave hint to say live hint needspring-boot-actuator.language server jstack is :
kdvolder commentedon Dec 21, 2018
Nothing suspicious looking in the stack dump. So unfortunately that didn't help :-(
I'm thinking something may be wrong on the Eclipse side. I suspect something to do with how lsp4e enables functionality based on document content types. I vaguely remember in the past that reconcile don't follow the same rules as completions and hovers. Is your file called 'applition.yml' or is it something else like 'application-development.yml'?
cenggel commentedon Dec 24, 2018
@kdvolder I tried
application.ymlapplication-dev.ymlbootstrap.yml.eclipse config:
cenggel commentedon Dec 29, 2018
My friend run spring-tool-suite-4-4.1.0.RELEASE-e4.10.0-win32.win32.x86_64.zip on win10 and java 8 , when edit
application.ymlcontent-assist not showing up .martinlippert commentedon Jan 2, 2019
OK, maybe this is a stupid thought, but are you talking about content-assist not showing up AUTOMATICALLY while typing something or after typing
.?!?That happens in STS3, but not in the STS4 editors. In the STS4 editors you have to invoke the content-assist manually by pressing
CTRL+Space. Are you talking about this difference?cenggel commentedon Jan 10, 2019
@martinlippert Thanks for your replay! I found the content-assist showing up key is not
CTRL+Space, in my eclipse default binding toALT+/so when pressCTRL+Spacecan't showing content-assist.How to AUTOMATICALLY showing up content-assist in the STS4 editors ?It is possible ?
martinlippert commentedon Jan 13, 2019
@cenggel Just to verify, you can get content-assist to show up for property files on your end by using the content-assist key binding that is configured on your install, right?
If so, we should close this issue and open a new one for the "show content-assist automatically", which should certainly be possible to implement. Agree?
cenggel commentedon Jan 14, 2019
@martinlippert Yes, can get content-assist manually now .
Agree close this issue and open new one for "show content-assist automatically" .
martinlippert commentedon Jan 14, 2019
Ok, great, will close this one and opened another one for the automatic content-assist here: #182