最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

spring tools 4 - I have an eclipse project based on 3.1.5 Springboot that I want to upgrade but I get an InvocationTargetExcepti

programmeradmin4浏览0评论

Everytime I try to upgrade my project, I get the display of the recipes, and I select the next version of spring boot available but after confirmation and clicking okay, I get the exception below:

java.lang.reflect.InvocationTargetException
    at .springframework.tooling.boot.lsmands.RewriteRefactoringsHandler.lambda$3(RewriteRefactoringsHandler.java:114)
    at .eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:124)
Caused by: java.util.concurrent.ExecutionException: .eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.
    at java.base/java.util.concurrent.CompletableFuture.wrapInExecutionException(CompletableFuture.java:345)
    at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:440)
    at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2117)
    at .springframework.tooling.boot.lsmands.RewriteRefactoringsHandler.lambda$3(RewriteRefactoringsHandler.java:112)
    ... 1 more
Caused by: .eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.
    at .eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:220)
    at .eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:204)
    at .eclipse.lsp4e.LanguageServerWrapper.lambda$3(LanguageServerWrapper.java:356)
    at .eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:185)
    at .eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:97)
    at .eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:114)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.lang.Thread.run(Thread.java:1575)

I was going to try to upgrade manually, but after some reasearch I still have a lot of question? I am using gradle. Is it just a matter of updating the build.gradle (by that I mean changing the version of my plugin and dependancies?)

I have tried that but then what about the eclipse springboot runtime?

Everytime I try to upgrade my project, I get the display of the recipes, and I select the next version of spring boot available but after confirmation and clicking okay, I get the exception below:

java.lang.reflect.InvocationTargetException
    at .springframework.tooling.boot.lsmands.RewriteRefactoringsHandler.lambda$3(RewriteRefactoringsHandler.java:114)
    at .eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:124)
Caused by: java.util.concurrent.ExecutionException: .eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.
    at java.base/java.util.concurrent.CompletableFuture.wrapInExecutionException(CompletableFuture.java:345)
    at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:440)
    at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2117)
    at .springframework.tooling.boot.lsmands.RewriteRefactoringsHandler.lambda$3(RewriteRefactoringsHandler.java:112)
    ... 1 more
Caused by: .eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.
    at .eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:220)
    at .eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:204)
    at .eclipse.lsp4e.LanguageServerWrapper.lambda$3(LanguageServerWrapper.java:356)
    at .eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:185)
    at .eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:97)
    at .eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:114)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.lang.Thread.run(Thread.java:1575)

I was going to try to upgrade manually, but after some reasearch I still have a lot of question? I am using gradle. Is it just a matter of updating the build.gradle (by that I mean changing the version of my plugin and dependancies?)

I have tried that but then what about the eclipse springboot runtime?

Share Improve this question asked Mar 21 at 13:09 GunfusGunfus 33 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

I seem to have figure it out. I noticed that at times it would also show an error related to the different minor major version, which is often related to code compiled in one JDK version and running in a different one.

I cleaned up my computer of JDKs and reconfigured eclipse and things are now working.

And to complete the answer about changing the runtime, it is all about the jars that are in the classpath for the app. So after the upgrade, and check/verify that the guild.gradle has the correct .springframework.boot version in my case 3.4.4

plugins {
    id 'java'
    id '.springframework.boot' version '3.4.4'
    id 'io.spring.dependency-management' version '1.1.7'
}

And the last step os to right click on the project select Gradle > Refresh Gradle project. That should update all the Jars in the Project and External Dependecies and when you ran the next time the startup should say:

... Running with Spring Boot v3.4.4, Spring v6.2.5

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论