java.util.concurrent.CompletionException: java.nio.file.InvalidPathException: Trailing char < > at index N

Hi,

When starting sonar lint, I get this error

VSCode SonarLint output

[Info  - 10:25:42.475] Started security hotspot handler on port 64120
Initializing file:///c%3A/Users/mason/Documents/ef-host on branch release/2.42.3
[Warn  - 10:25:42.757] Plugin 'bcsbankjavacustom' embeds dependencies. This will be deprecated soon. Plugin should be updated.
[Warn  - 10:25:42.835] Plugin 'secrets' embeds dependencies. This will be deprecated soon. Plugin should be updated.
[Info  - 10:25:52.873] Downloaded plugin list in 117ms
[Info  - 10:25:52.875] [SYNC] Synchronizing 'ef-front'
[Info  - 10:25:52.966] Downloaded settings in 80ms
[Info  - 10:25:53.067] [SYNC] Active rules for 'apex' are up-to-date
[Info  - 10:25:53.067] [SYNC] Active rules for 'java' are up-to-date
[Info  - 10:25:53.067] [SYNC] Active rules for 'js' are up-to-date
[Info  - 10:25:53.067] [SYNC] Active rules for 'php' are up-to-date
[Info  - 10:25:53.068] [SYNC] Active rules for 'plsql' are up-to-date
[Info  - 10:25:53.068] [SYNC] Active rules for 'py' are up-to-date
[Info  - 10:25:53.068] [SYNC] Active rules for 'ts' are up-to-date
[Info  - 10:25:53.068] [SYNC] Active rules for 'web' are up-to-date
[Info  - 10:25:53.068] [SYNC] Active rules for 'xml' are up-to-date
[Error - 10:28:11] Request textDocument/codeAction failed.
  Message: Internal error.
  Code: -32603 
java.util.concurrent.CompletionException: java.nio.file.InvalidPathException: Trailing char < > at index 76: node_modules/@bcs/ef-front-activities/lib/components/ActivitiesPaginatonLine /Config.js.map
	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.exec(CompletableFuture.java:483)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.nio.file.InvalidPathException: Trailing char < > at index 76: node_modules/@bcs/ef-front-activities/lib/components/ActivitiesPaginatonLine /Config.js.map
	at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:172)
	at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
	at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
	at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
	at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:232)
	at java.base/java.nio.file.Path.of(Path.java:147)
	at java.base/java.nio.file.Paths.get(Paths.java:69)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.lambda$calculatePathPrefixes$13(ConnectedSonarLintEngineImpl.java:452)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1707)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.calculatePathPrefixes(ConnectedSonarLintEngineImpl.java:453)
	at org.sonarsource.sonarlint.ls.connected.ProjectBindingManager.computeProjectBinding(ProjectBindingManager.java:203)
	at org.sonarsource.sonarlint.ls.connected.ProjectBindingManager.lambda$getBinding$0(ProjectBindingManager.java:151)
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
	at org.sonarsource.sonarlint.ls.connected.ProjectBindingManager.getBinding(ProjectBindingManager.java:144)
	at org.sonarsource.sonarlint.ls.connected.ProjectBindingManager.getBinding(ProjectBindingManager.java:139)
	at org.sonarsource.sonarlint.ls.CommandManager.computeCodeActions(CommandManager.java:110)
	at org.sonarsource.sonarlint.ls.SonarLintLanguageServer.lambda$codeAction$3(SonarLintLanguageServer.java:277)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
	... 6 more

[Warn  - 10:30:42.421] Failed to request SonarLint notifications
[Warn  - 10:30:42.422] java.lang.IllegalStateException: org.apache.hc.core5.http.ConnectionClosedException: Connection closed by peer
	at org.sonarsource.sonarlint.ls.http.ApacheHttpClient.executeSync(ApacheHttpClient.java:95)
	at org.sonarsource.sonarlint.ls.http.ApacheHttpClient.get(ApacheHttpClient.java:66)
	at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.rawGet(ServerApiHelper.java:92)
	at org.sonarsource.sonarlint.core.serverapi.developers.DevelopersApi.getEvents(DevelopersApi.java:57)
	at org.sonarsource.sonarlint.core.notifications.NotificationChecker.request(NotificationChecker.java:44)
	at org.sonarsource.sonarlint.core.notifications.NotificationTimerTask.requestForServer(NotificationTimerTask.java:78)
	at org.sonarsource.sonarlint.core.notifications.NotificationTimerTask.run(NotificationTimerTask.java:62)
	at java.base/java.util.TimerThread.mainLoop(Timer.java:566)
	at java.base/java.util.TimerThread.run(Timer.java:516)
Caused by: org.apache.hc.core5.http.ConnectionClosedException: Connection closed by peer
	at org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.onInput(AbstractHttp1StreamDuplexer.java:349)
	at org.apache.hc.core5.http.impl.nio.AbstractHttp1IOEventHandler.inputReady(AbstractHttp1IOEventHandler.java:64)
	at org.apache.hc.core5.http.impl.nio.ClientHttp1IOEventHandler.inputReady(ClientHttp1IOEventHandler.java:39)
	at org.apache.hc.core5.reactor.ssl.SSLIOSession.decryptData(SSLIOSession.java:574)
	at org.apache.hc.core5.reactor.ssl.SSLIOSession.access$400(SSLIOSession.java:72)
	at org.apache.hc.core5.reactor.ssl.SSLIOSession$1.inputReady(SSLIOSession.java:172)
	at org.apache.hc.core5.reactor.InternalDataChannel.onIOEvent(InternalDataChannel.java:131)
	at org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51)
	at org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:178)
	at org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:127)
	at org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:85)
	at org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44)
	at java.base/java.lang.Thread.run(Thread.java:833)

Worksapce settings for sonarlint

"sonarlint.connectedMode.project": {
        "projectKey": "key"
    }

Project settings for sonarlint

"sonarlint.ls.javaHome": "C:\\Program Files\\Java\\jdk-17.0.2",
    "sonarlint.connectedMode.connections.sonarqube": [
        {
            "serverUrl": "serverUrl to sonar cube",
            "token": "123123123",
        }
    ]

Solved the problem. some directories have a space as a special character at the end

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.