sts4 icon indicating copy to clipboard operation
sts4 copied to clipboard

Spring Boot Tools vscode extension error popup: Request textDocument/definition failed

Open byMozq opened this issue 3 years ago • 2 comments

Type: Bug

when press ctrl and hover java syntax with mouse pointer, popup always appears at the bottom right corner says: request textDocument/definition failed, source: Spring Boot Tools (Extension). it's so annoying.

output log:

[Error - 12:04:22 PM] Request textDocument/definition failed. Message: Internal error. Code: -32603 java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: Illegal character in path at index 16: file:///C:/Local - Data/ir-backend/src/main/java/irs/mycom/co/id/controller/DummyController.java at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649) at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.lang.IllegalArgumentException: Illegal character in path at index 16: file:///C:/Local - Data/ir-backend/src/main/java/irs/mycom/co/id/controller/DummyController.java at java.base/java.net.URI.create(URI.java:906) at org.springframework.ide.vscode.boot.jdt.ls.JdtLsProjectCache.find(JdtLsProjectCache.java:202) at org.springframework.ide.vscode.boot.java.JavaDefinitionHandler.handle(JavaDefinitionHandler.java:55) at org.springframework.ide.vscode.languageserver.starter.LanguageServerAutoConf.lambda$registerDefinitionHandler$2(LanguageServerAutoConf.java:97) at org.springframework.ide.vscode.commons.languageserver.util.SimpleTextDocumentService.lambda$definition$6(SimpleTextDocumentService.java:372) at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ... 4 more Caused by: java.net.URISyntaxException: Illegal character in path at index 16: file:///C:/Local - Data/ir-backend/src/main/java/irs/mycom/co/id/controller/DummyController.java at java.base/java.net.URI$Parser.fail(URI.java:2974) at java.base/java.net.URI$Parser.checkChars(URI.java:3145) at java.base/java.net.URI$Parser.parseHierarchical(URI.java:3227) at java.base/java.net.URI$Parser.parse(URI.java:3175) at java.base/java.net.URI.(URI.java:623) at java.base/java.net.URI.create(URI.java:904) ... 9 more

it looks like this is happening because of the space in the folder name (Local - Data), when I remove the space in the folder name (Local-Data) the popup disappeared

Extension version: 1.47.0 VS Code version: Code 1.80.1 (74f6148eb9ea00507ec113ec51c489d6ffb4b771, 2023-07-12T17:22:07.651Z) OS version: Windows_NT x64 10.0.22621 Modes:

System Info
Item Value
CPUs 12th Gen Intel(R) Core(TM) i5-1245U (12 x 2496)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.69GB (3.30GB free)
Process Argv --crash-reporter-id b2f7e2c1-dae3-41b5-bb01-f85010d07b58
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627cf:30244335
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscoreces:30445986
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263:30792226
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
3biah626:30602489
pyind779:30671433
89544117:30613380
pythonsymbol12:30671437
showlangstatbar:30737416
vsctsb:30748421
pythonms35:30701012
03d35959:30757346
pythonfmttext:30731395
pythoncmvfstrcf:30756944
fixshowwlkth:30771522
showindicator:30785052
pythongtdpath:30769146
bgfeh915:30780428
pythonnosmt12:30779714
pythonidxpt:30784022
pythonnoceb:30776495
h7j2d465:30786200
dsvsc013:30789517
dsvsc014cf:30791936

byMozq avatar Jul 18 '23 05:07 byMozq

@bymoz the temporary workaround is rename Local - Data folder into Local-Data (i.e. no spaces)

BoykoAlex avatar Jul 18 '23 19:07 BoykoAlex

Hopefully fixes with 5717fd04707151a94d904396115fbab4fc0b8c6a

BoykoAlex avatar Jul 18 '23 20:07 BoykoAlex