Skip to content

[refactoring] Exception when trying to convert project #900

Closed

Description

@martinlippert

I have petclinic in the workspace, but nothing open except for the pom.xml file. A language server got started for the refactorings dialog to show up, and then, when executing the refactoring, another language server got started and throws this exception:

13:36:24.067 [ForkJoinPool.commonPool-worker-3] ERROR o.e.lsp4j.jsonrpc.RemoteEndpoint - Internal error: java.lang.IllegalArgumentException: Cannot find Spring Boot project for uri: file:/Users/mlippert/workspace/projects-demos-issues/spring-petclinic-sb3-conversion
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: Cannot find Spring Boot project for uri: file:/Users/mlippert/workspace/projects-demos-issues/spring-petclinic-sb3-conversion
	at java.base/java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:368)
	at java.base/java.util.concurrent.CompletableFuture.completeRelay(CompletableFuture.java:377)
	at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1152)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
	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.lang.IllegalArgumentException: Cannot find Spring Boot project for uri: file:/Users/mlippert/workspace/projects-demos-issues/spring-petclinic-sb3-conversion
	at org.springframework.ide.vscode.boot.java.rewrite.RewriteRecipeRepository.lambda$apply$17(RewriteRecipeRepository.java:383)
	at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
	... 8 common frames omitted

The full log output from the language server:

13:36:18.877 [main] INFO  o.s.i.v.b.a.BootLanguageServerBootApp - Starting BootLanguageServerBootApp using Java 17.0.5 on lippertm-a01.vmware.com with PID 56071 (/Users/mlippert/workspace/distributions/sts4170ci/SpringToolSuite4.app/Contents/Eclipse/plugins/org.springframework.tooling.boot.ls_1.41.0.202211210336/servers/spring-boot-language-server/BOOT-INF/classes started by mlippert in /Users/mlippert/workspace/distributions/sts4170ci/SpringToolSuite4.app/Contents/MacOS)
13:36:18.880 [main] INFO  o.s.i.v.b.a.BootLanguageServerBootApp - No active profile set, falling back to 1 default profile: "default"
13:36:19.352 [main] INFO  o.s.i.v.boot.app.SpringSymbolIndex - project listener registered
13:36:19.524 [main] INFO  o.s.i.v.b.a.BootLanguageServerBootApp - Started BootLanguageServerBootApp in 0.975 seconds (JVM running for 1.455)
13:36:19.526 [main] INFO  o.s.i.v.c.l.LanguageServerRunner - java.home = /Users/mlippert/workspace/distributions/sts4170ci/SpringToolSuite4.app/Contents/Eclipse/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.macosx.x86_64_17.0.5.v20221102-0933/jre
13:36:19.527 [LanguageServerApp-lifecycle] INFO  o.s.i.v.c.l.LanguageServerRunner - Server ready to start after 1457 ms
13:36:19.527 [LanguageServerApp-lifecycle] INFO  o.s.i.v.c.l.LanguageServerRunner - Starting LS as client
13:36:19.527 [LanguageServerApp-lifecycle] INFO  o.s.i.v.c.l.LanguageServerRunner - Connected to parent using stdio
13:36:19.599 [pool-10-thread-1] INFO  o.s.i.v.c.l.u.SimpleLanguageServer - Initializing
13:36:19.613 [pool-10-thread-1] INFO  o.s.i.v.c.l.u.CompletionServerCapabilityRegistration - hasDynamicCompletionRegistration = false
13:36:19.613 [pool-10-thread-1] INFO  o.s.i.v.c.l.u.CompletionServerCapabilityRegistration - Registering Completion Capability Statically
13:36:19.614 [pool-10-thread-1] INFO  o.s.i.v.c.l.u.SimpleLanguageServer - Returning server capabilities to client
13:36:19.642 [pool-10-thread-1] INFO  o.s.i.v.boot.app.SpringSymbolIndex - update settings of spring indexer - start
13:36:19.642 [pool-10-thread-1] INFO  o.s.i.v.boot.app.SpringSymbolIndex - update settings of spring indexer - done
13:36:19.644 [pool-10-thread-1] INFO  o.s.i.v.b.j.BootJavaLanguageServerComponents - update live process tracker settings - start
13:36:19.645 [ForkJoinPool.commonPool-worker-1] INFO  o.s.i.v.b.j.r.RewriteRecipeRepository - Loading Rewrite Recipes...
13:36:19.645 [pool-10-thread-1] INFO  o.s.i.v.b.j.BootJavaLanguageServerComponents - update live process tracker settings - done
13:36:19.645 [pool-10-thread-1] INFO  o.s.i.v.b.a.BootLanguageServerInitializer - A configuration changed, triggering reconcile on all open documents
13:36:19.647 [pool-10-thread-1] INFO  o.s.i.v.b.j.l.v.SpringProcessConnectorRemote - updating settings for remote processses to track - start
13:36:19.647 [pool-10-thread-1] INFO  o.s.i.v.b.j.l.v.SpringProcessConnectorRemote - updating settings for remote processses to track - done
13:36:19.647 [pool-10-thread-1] INFO  o.s.i.v.boot.app.SpringSymbolIndex - update settings of spring indexer - start
13:36:19.647 [pool-10-thread-1] INFO  o.s.i.v.boot.app.SpringSymbolIndex - update settings of spring indexer - done
13:36:19.649 [pool-10-thread-1] INFO  o.s.i.v.b.j.BootJavaLanguageServerComponents - update live process tracker settings - start
13:36:19.649 [pool-10-thread-1] INFO  o.s.i.v.b.j.BootJavaLanguageServerComponents - update live process tracker settings - done
13:36:19.650 [pool-10-thread-1] INFO  o.s.i.v.b.a.BootLanguageServerInitializer - A configuration changed, triggering reconcile on all open documents
13:36:19.650 [pool-10-thread-1] INFO  o.s.i.v.b.j.l.v.SpringProcessConnectorRemote - updating settings for remote processses to track - start
13:36:19.650 [pool-10-thread-1] INFO  o.s.i.v.b.j.l.v.SpringProcessConnectorRemote - updating settings for remote processses to track - done
13:36:19.702 [Simple-Language-Server main thread] INFO  o.s.i.v.c.l.u.SimpleLanguageServer - Initialization completed after 1632 ms
13:36:20.029 [Simple-Language-Server main thread] INFO  o.s.i.v.boot.app.SpringSymbolIndex - project created event: demo
13:36:20.032 [Simple-Language-Server main thread] INFO  o.s.i.v.b.j.r.RewriteCompilationUnitCache - CU Cache: invalidate project <demo>
13:36:20.047 [pool-5-thread-1] INFO  o.s.i.v.b.j.utils.SpringIndexerJava - scan java files for symbols for project: demo - no. of files: 1
13:36:20.136 [pool-5-thread-1] INFO  o.s.i.v.b.j.utils.SpringIndexerJava - scan java files used cached data: demo - no. of cached symbols retrieved: 1
13:36:20.137 [pool-5-thread-1] INFO  o.s.i.v.b.j.utils.SpringIndexerJava - scan java files restored cached dependency data: 0 - no. of cached dependencies: {}
13:36:20.138 [pool-5-thread-1] INFO  o.s.i.v.b.j.utils.SpringIndexerJava - scan java files for symbols for project: demo took ms: 90
13:36:20.145 [pool-5-thread-1] INFO  o.s.i.v.b.j.u.SpringFactoriesIndexer - scan factories files for symbols for project: demo - no. of files: 0
13:36:20.149 [pool-5-thread-1] INFO  o.s.i.v.b.j.u.SpringFactoriesIndexer - scan factories files used cached data: demo - no. of cached symbols retrieved: 0
13:36:20.149 [pool-5-thread-1] INFO  o.s.i.v.b.j.u.SpringFactoriesIndexer - scan factories files for symbols for project: demo took ms: 11
13:36:20.150 [pool-5-thread-1] INFO  o.s.i.v.b.a.BootLanguageServerInitializer - A configuration changed, triggering reconcile on all open documents
13:36:21.760 [Simple-Language-Server main thread] INFO  o.s.i.v.boot.app.SpringSymbolIndex - project created event: demo-1
13:36:21.761 [Simple-Language-Server main thread] INFO  o.s.i.v.b.j.r.RewriteCompilationUnitCache - CU Cache: invalidate project <demo-1>
13:36:21.761 [pool-5-thread-1] INFO  o.s.i.v.b.j.utils.SpringIndexerJava - scan java files for symbols for project: demo-1 - no. of files: 1
13:36:21.764 [pool-5-thread-1] INFO  o.s.i.v.b.j.utils.SpringIndexerJava - scan java files used cached data: demo-1 - no. of cached symbols retrieved: 1
13:36:21.764 [pool-5-thread-1] INFO  o.s.i.v.b.j.utils.SpringIndexerJava - scan java files restored cached dependency data: 0 - no. of cached dependencies: {}
13:36:21.765 [pool-5-thread-1] INFO  o.s.i.v.b.j.utils.SpringIndexerJava - scan java files for symbols for project: demo-1 took ms: 3
13:36:21.765 [pool-5-thread-1] INFO  o.s.i.v.b.j.u.SpringFactoriesIndexer - scan factories files for symbols for project: demo-1 - no. of files: 0
13:36:21.766 [pool-5-thread-1] INFO  o.s.i.v.b.j.u.SpringFactoriesIndexer - scan factories files used cached data: demo-1 - no. of cached symbols retrieved: 0
13:36:21.766 [pool-5-thread-1] INFO  o.s.i.v.b.j.u.SpringFactoriesIndexer - scan factories files for symbols for project: demo-1 took ms: 1
13:36:21.766 [pool-5-thread-1] INFO  o.s.i.v.b.a.BootLanguageServerInitializer - A configuration changed, triggering reconcile on all open documents
13:36:21.897 [ForkJoinPool.commonPool-worker-1] INFO  o.s.i.v.b.j.r.RewriteRecipeRepository - Done loading Rewrite Recipes
13:36:21.897 [ForkJoinPool.commonPool-worker-1] INFO  o.s.i.v.b.a.BootLanguageServerInitializer - A configuration changed, triggering reconcile on all open documents
13:36:24.067 [ForkJoinPool.commonPool-worker-3] ERROR o.e.lsp4j.jsonrpc.RemoteEndpoint - Internal error: java.lang.IllegalArgumentException: Cannot find Spring Boot project for uri: file:/Users/mlippert/workspace/projects-demos-issues/spring-petclinic-sb3-conversion
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: Cannot find Spring Boot project for uri: file:/Users/mlippert/workspace/projects-demos-issues/spring-petclinic-sb3-conversion
	at java.base/java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:368)
	at java.base/java.util.concurrent.CompletableFuture.completeRelay(CompletableFuture.java:377)
	at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1152)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
	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.lang.IllegalArgumentException: Cannot find Spring Boot project for uri: file:/Users/mlippert/workspace/projects-demos-issues/spring-petclinic-sb3-conversion
	at org.springframework.ide.vscode.boot.java.rewrite.RewriteRecipeRepository.lambda$apply$17(RewriteRecipeRepository.java:383)
	at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
	... 8 common frames omitted
13:36:24.097 [Simple-Language-Server main thread] INFO  o.s.i.v.boot.app.SpringSymbolIndex - project created event: gs-rest-service-complete
13:36:24.098 [Simple-Language-Server main thread] INFO  o.s.i.v.b.j.r.RewriteCompilationUnitCache - CU Cache: invalidate project <gs-rest-service-complete>
13:36:24.099 [pool-5-thread-1] INFO  o.s.i.v.b.j.utils.SpringIndexerJava - scan java files for symbols for project: gs-rest-service-complete - no. of files: 6
13:36:24.103 [pool-5-thread-1] INFO  o.s.i.v.b.j.utils.SpringIndexerJava - scan java files used cached data: gs-rest-service-complete - no. of cached symbols retrieved: 6
13:36:24.104 [pool-5-thread-1] INFO  o.s.i.v.b.j.utils.SpringIndexerJava - scan java files restored cached dependency data: 0 - no. of cached dependencies: {}
13:36:24.104 [pool-5-thread-1] INFO  o.s.i.v.b.j.utils.SpringIndexerJava - scan java files for symbols for project: gs-rest-service-complete took ms: 5
13:36:24.104 [pool-5-thread-1] INFO  o.s.i.v.b.j.u.SpringFactoriesIndexer - scan factories files for symbols for project: gs-rest-service-complete - no. of files: 0
13:36:24.106 [pool-5-thread-1] INFO  o.s.i.v.b.j.u.SpringFactoriesIndexer - scan factories files used cached data: gs-rest-service-complete - no. of cached symbols retrieved: 0
13:36:24.106 [pool-5-thread-1] INFO  o.s.i.v.b.j.u.SpringFactoriesIndexer - scan factories files for symbols for project: gs-rest-service-complete took ms: 2
13:36:24.106 [pool-5-thread-1] INFO  o.s.i.v.b.a.BootLanguageServerInitializer - A configuration changed, triggering reconcile on all open documents
13:36:25.747 [Simple-Language-Server main thread] INFO  o.s.i.v.boot.app.SpringSymbolIndex - project created event: spring-petclinic
13:36:25.747 [Simple-Language-Server main thread] INFO  o.s.i.v.b.j.r.RewriteCompilationUnitCache - CU Cache: invalidate project <spring-petclinic>
13:36:25.750 [pool-5-thread-1] INFO  o.s.i.v.b.j.utils.SpringIndexerJava - scan java files for symbols for project: spring-petclinic - no. of files: 23
13:36:25.758 [pool-5-thread-1] INFO  o.s.i.v.b.j.utils.SpringIndexerJava - scan java files used cached data: spring-petclinic - no. of cached symbols retrieved: 71
13:36:25.758 [pool-5-thread-1] INFO  o.s.i.v.b.j.utils.SpringIndexerJava - scan java files restored cached dependency data: 0 - no. of cached dependencies: {}
13:36:25.758 [pool-5-thread-1] INFO  o.s.i.v.b.j.utils.SpringIndexerJava - scan java files for symbols for project: spring-petclinic took ms: 8
13:36:25.758 [pool-5-thread-1] INFO  o.s.i.v.b.j.u.SpringFactoriesIndexer - scan factories files for symbols for project: spring-petclinic - no. of files: 0
13:36:25.759 [pool-5-thread-1] INFO  o.s.i.v.b.j.u.SpringFactoriesIndexer - scan factories files used cached data: spring-petclinic - no. of cached symbols retrieved: 0
13:36:25.759 [pool-5-thread-1] INFO  o.s.i.v.b.j.u.SpringFactoriesIndexer - scan factories files for symbols for project: spring-petclinic took ms: 1
13:36:25.759 [pool-5-thread-1] INFO  o.s.i.v.b.a.BootLanguageServerInitializer - A configuration changed, triggering reconcile on all open documents
13:36:39.925 [pool-10-thread-1] INFO  o.s.i.v.c.l.u.SimpleLanguageServer - shutdown: request arrived
13:36:39.926 [pool-10-thread-1] INFO  o.s.i.v.c.l.u.SimpleLanguageServer - shutdown: call shutdown handler
13:36:39.926 [pool-10-thread-1] INFO  o.s.i.v.c.l.j.l.ClasspathListenerManager - Unregistering classpath callback sts4.classpath.CVZEqQtX ...
13:36:39.927 [pool-10-thread-1] INFO  o.s.i.v.c.l.j.l.ClasspathListenerManager - Unregistering classpath callback sts4.classpath.CVZEqQtX OK
13:36:39.927 [pool-10-thread-1] INFO  o.s.i.v.c.l.u.SimpleLanguageServer - shutdown: complete
13:36:39.927 [pool-10-thread-1] INFO  o.s.i.v.c.l.u.SimpleLanguageServer - exit: notification received
==== Process Terminated====

Activity

  1. changed the title [-]Exception when trying to convert project[/-] [+][refactoring] Exception when trying to convert project[/+] on Nov 21, 2022
  2. added this to the 4.17.0.RELEASE milestone on Nov 21, 2022
  3. BoykoAlex commented on Nov 22, 2022

    @BoykoAlex
    Contributor

    This should be addressed with df0d85c which would start Boot LS early as soon as boot project is discovered in the workspace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions