Repository navigation
Closed
Milestone
Description
[Error - 2:50:31 PM] Request textDocument/definition failed.
Message: Internal error.
Code: -32603
java.util.concurrent.CompletionException: java.lang.NullPointerException
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:331)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:346)
at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:704)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088)
at reactor.core.publisher.MonoToCompletableFuture.onError(MonoToCompletableFuture.java:68)
at reactor.core.publisher.FluxSubscribeOnCallable$CallableSubscribeOnSubscription.run(FluxSubscribeOnCallable.java:228)
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NullPointerException
at org.springframework.ide.vscode.boot.app.PropertiesJavaDefinitionHandler.adjustedHighlightRangeForKey(PropertiesJavaDefinitionHandler.java:112)
at org.springframework.ide.vscode.boot.app.PropertiesJavaDefinitionHandler.getDefinitions(PropertiesJavaDefinitionHandler.java:87)
at org.springframework.ide.vscode.boot.app.PropertiesJavaDefinitionHandler.handle(PropertiesJavaDefinitionHandler.java:70)
at org.springframework.ide.vscode.languageserver.starter.LanguageServerAutoConf.lambda$null$2(LanguageServerAutoConf.java:96)
at org.springframework.ide.vscode.commons.languageserver.util.SimpleTextDocumentService.lambda$definition$9(SimpleTextDocumentService.java:364)
at reactor.core.publisher.MonoCallable.call(MonoCallable.java:91)
at reactor.core.publisher.FluxSubscribeOnCallable$CallableSubscribeOnSubscription.run(FluxSubscribeOnCallable.java:225)
... 7 more
I was using an application.properties file, outside of a project with content:
camel.component.activemq.errorHandlerLoggingLevel=DEBUG
It is triggered when calling completion with Ctrl+space but I cannot find a way to reliably reproduce
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]NPE in ropertiesJavaDefinitionHandler.adjustedHighlightRangeForKey[/-][+]NPE in PropertiesJavaDefinitionHandler.adjustedHighlightRangeForKey[/+]BoykoAlex commentedon Jan 8, 2020
AFAIU the setup is the following:
Project A located in the workspace has
camel.component.activemq.errorHandlerLoggingLevel=DEBUGproperty defined.Project B depends on project A has
application.propertiesfile that is being edited.Content assists is invoked with content
camel.component.activemq.errorHandlerLoggingLevel=DEBUG? Where is the cursor at the moment of CA invocation?The NPE is in "jump to definition" code. This code is invoked when Ctrl/Cmd key is pressed and mouse is hovered over content in Boot properties file. I doubt it is related to CA but rather to hovering over content in Boot properties file with Ctrl/Cmd pressed... Are you getting this NPE while hovering on something in particular?
We should definitely guard against the NPE while hovering on something that isn't a boot property but if it is a valid boot property and the NPE is occurring we'd need to dig deeper into this.
apupier commentedon Jan 8, 2020
this is the full application.properties file content
I was able to have the stack when the cursor was at different places in "activemq.errorHandlerLoggingLevel" but calling on the same place doesn't trigger the stack every time.
and now realizing what you mean. I have the stack without calling the content assist.
I "just" need to Ctrl+hover on any parts of the file content to have the stack.
I can reproduce with a single file in the workspace of the VS Code instance and with another content
BoykoAlex commentedon Jan 8, 2020
Thanks! Should be a trivial fix... Will try to get it in by the end of today.
BoykoAlex commentedon Jan 9, 2020
Should be fixed with f460ad2
Please try updating from the nightly update site:
martinlippert commentedon Jan 9, 2020
@apupier The Eclipse p2 repos for the CI builds are:
(not the one that Alex mentioned above, I think).
In case you are looking for the CI build of the VSCode extension, you can find that one here:
(but it looks like the latest CI build isn't there yet, so need to take a look at what is wrong there)
kdvolder commentedon Jan 9, 2020
From what I can tell the builds seem to fine now. Seems to have been a disk space issue on the build machines earlier.
apupier commentedon Jan 10, 2020
tested with nightly vscode-spring-boot-1.15.0-202001091659.vsix and the issue is fixed.
Thanks!