Repository navigation
Closed as duplicate
Labels
for: eclipsesomething that is specific for Eclipsefor: vscodesomething that is specific for VSCodetype: bug
Milestone
Description
Describe the bug
Quickfix cause exception,
To Reproduce
I have an interface with some methods defined. For example:
@Validated
@RequestMapping(path = ConfigurationControllerApi.ConfiguratioApiPath.V1)
@SecurityRequirement(name = "basicScheme")
@ApiResponses(value = {
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = APPLICATION_PROBLEM_JSON_VALUE, schema = @Schema(implementation = ProblemDetail.class))),
@ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = APPLICATION_PROBLEM_JSON_VALUE, schema = @Schema(implementation = ProblemDetail.class))),
@ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(mediaType = APPLICATION_PROBLEM_JSON_VALUE, schema = @Schema(implementation = ProblemDetail.class))),
@ApiResponse(responseCode = "404", description = "Not found", content = @Content(mediaType = APPLICATION_PROBLEM_JSON_VALUE, schema = @Schema(implementation = ProblemDetail.class))),
@ApiResponse(responseCode = "500", description = "Internal Server Error", content = @Content(mediaType = APPLICATION_PROBLEM_JSON_VALUE, schema = @Schema(implementation = ProblemDetail.class)))
})
public interface ConfigurationControllerApi extends CommonControllerApi {
...
@PostMapping(path = ConfiguratioApiPath.CREATE_ACTIONS, produces = APPLICATION_JSON_VALUE)
ResponseEntity<ConfigurationResult> createConfigurationFromActions(//
@Parameter(description = ConfigurationApiParameterDescription.PRODUCT_ID_DESCRIPTION, example = "1LE1X") //
@PathVariable(value = ConfigurationApiParameter.PRODUCT_ID) //
@NotBlank //
@ProductId //
String productId,
@io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, description = "Required payload for the request.", //
content = {
@io.swagger.v3.oas.annotations.media.Content(mediaType = APPLICATION_JSON_VALUE, examples = {
@ExampleObject(
name = "0 - Only a single Configuration-Action (1LE1X)",
summary = "One single Configuration-Action (1LE1X)",
description = "In this basic example we have only one 'configurationActions'.",
value = """
{
"configurationActions": [
{
"type": "CREATE_CONFIGURATION",
"entries": [
{
"key": "VERSION",
"value": "LATEST"
},
{
"key": "PRODUCT_ID",
"value": "1LE1X"
}
]
}
]
}
"""),
@ExampleObject(
name = "1 - Multiple Configuration-Actions (1LE1X)",
summary = "Multiple Configuration-Action (1LE1X)",
description = "In this example we have multiple 'configurationActions'.",
value = """
{
"configurationActions": [
{
"type": "CREATE_CONFIGURATION",
"entries": [
{
"key": "VERSION",
"value": "LATEST"
},
{
"key": "PRODUCT_ID",
"value": "1LE1X"
}
]
},
{
"type": "SET_CSTIC",
"entries": [
{
"key": "ELEMENT_LOCATION",
"value": "1"
}
],
"csticInfo": [
{
"csticName": "UI_LANGUAGE_1LE1X",
"valueNames": [
"DE"
]
}
]
}
]
}
"""), //
@ExampleObject(
name = "2 - Multiple Configuration-Actions and Initialization-Cstics (G120)",
summary = "Multiple Configuration-Actions and Initialization-Cstics (G120)",
description = "In this example we have multiple 'configurationActions'. They are used first to build the configuration and after this is successfully done the given 'initializationCstics' applied on-top of that.",
value = """
{
"initializationCstics": [
{
"csticName": "HMK_REGION_G120",
"valueNames": ["WW"]
}
],
"configurationActions": [
{
"type": "CREATE_CONFIGURATION",
"entries": [
{
"key": "VERSION",
"value": "LATEST"
},
{
"key": "PRODUCT_ID",
"value": "G120"
}
]
},
{
"type": "SET_CSTIC",
"entries": [
{
"key": "ELEMENT_LOCATION",
"value": "1"
}
],
"csticInfo": [
{
"csticName": "HMK_TRIG_INTER_INTRA_G120",
"valueNames": [
"intranet"
]
}
]
}
]
}
"""), //
}) //
}) //
@RequestBody //
@NotNull //
CreateConfigurationFromActionsPayload payload,
@Parameter(description = """
How to handle errors? If you use 'BESTEFFORT' then all errors which may occur during the processing of the given actions are ignored,
we try to continue processing all given actions until the end and return the result. Strategy 'strict' could be used if you need the exact same result as it was
as you get the actions, the first error stop the whole process and we return an error. We support also automatic version-upgrade in case 'BESTEFFORT' was given,
means if you submit a product-version which is no longer available then we upgrade to version 'LATEST'.""") //
@RequestParam(value = "strategy", required = false, defaultValue = "BESTEFFORT") //
LoadStrategy strategy, @Parameter(description = "Add the full configuration to the result?") //
@RequestParam(value = ConfigurationApiParameter.ADD_CONFIG, required = false, defaultValue = "false") //
boolean addConfig, @Parameter(description = "Possibility to skip the creation-cache.") //
@RequestParam(value = ConfigurationApiParameter.NO_CREATION_CACHE, required = false, defaultValue = "false") //
boolean noCreationCache);
...
}
Spring Boot Language Server (4.31.0.202506052016) shows me quick fixes for "@RequestParam(value = "strategy",...."
"Unnecessary path variable definition [WEB_ANNOTATION_NAMES]"
Doesn't matter which one I choose ... "this one" and "in file" ... the operation crash in the ls ...
Here is the log ...
08:36:58.350 [pool-13-thread-1] ERROR o.s.i.v.c.rewrite.java.ORAstUtils -
java.lang.NoClassDefFoundError: com/sun/tools/javac/code/Type$UnknownType
at org.openrewrite.java.isolated.ReloadableJava21TypeMapping.type(ReloadableJava21TypeMapping.java:49)
at org.openrewrite.java.isolated.ReloadableJava21TypeMapping.type(ReloadableJava21TypeMapping.java:387)
at org.openrewrite.java.isolated.ReloadableJava21TypeMapping.type(ReloadableJava21TypeMapping.java:380)
at org.openrewrite.java.isolated.ReloadableJava21ParserVisitor.visitMemberSelect(ReloadableJava21ParserVisitor.java:906)
at org.openrewrite.java.isolated.ReloadableJava21ParserVisitor.visitMemberSelect(ReloadableJava21ParserVisitor.java:77)
at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:2585)
at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:92)
at org.openrewrite.java.isolated.ReloadableJava21ParserVisitor.convert(ReloadableJava21ParserVisitor.java:1699)
at org.openrewrite.java.isolated.ReloadableJava21ParserVisitor.visitMemberSelect(ReloadableJava21ParserVisitor.java:908)
at org.openrewrite.java.isolated.ReloadableJava21ParserVisitor.visitMemberSelect(ReloadableJava21ParserVisitor.java:77)
at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:2585)
at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:92)
at org.openrewrite.java.isolated.ReloadableJava21ParserVisitor.convert(ReloadableJava21ParserVisitor.java:1699)
at org.openrewrite.java.isolated.ReloadableJava21ParserVisitor.visitImport(ReloadableJava21ParserVisitor.java:753)
at org.openrewrite.java.isolated.ReloadableJava21ParserVisitor.visitImport(ReloadableJava21ParserVisitor.java:77)
at com.sun.tools.javac.tree.JCTree$JCImportBase.accept(JCTree.java:678)
at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:92)
at org.openrewrite.java.isolated.ReloadableJava21ParserVisitor.convert(ReloadableJava21ParserVisitor.java:1699)
at org.openrewrite.java.isolated.ReloadableJava21ParserVisitor.convert(ReloadableJava21ParserVisitor.java:1735)
at org.openrewrite.java.isolated.ReloadableJava21ParserVisitor.convertAll(ReloadableJava21ParserVisitor.java:1804)
at org.openrewrite.java.isolated.ReloadableJava21ParserVisitor.visitCompilationUnit(ReloadableJava21ParserVisitor.java:563)
at org.openrewrite.java.isolated.ReloadableJava21ParserVisitor.visitCompilationUnit(ReloadableJava21ParserVisitor.java:77)
at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:627)
at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:92)
at org.openrewrite.java.isolated.ReloadableJava21Parser.lambda$parseInputs$0(ReloadableJava21Parser.java:166)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:215)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1939)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:570)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:560)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:265)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:727)
at org.springframework.ide.vscode.commons.rewrite.java.ORAstUtils.parseInputs(ORAstUtils.java:332)
at org.springframework.ide.vscode.boot.java.rewrite.RewriteRefactorings.lambda$perform$6(RewriteRefactorings.java:144)
at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1233)
at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2393)
at org.springframework.ide.vscode.boot.java.rewrite.RewriteRefactorings.perform(RewriteRefactorings.java:132)
at org.springframework.ide.vscode.boot.java.rewrite.RewriteRefactorings.createEdit(RewriteRefactorings.java:122)
at org.springframework.ide.vscode.boot.java.rewrite.RewriteRefactorings.createEdits(RewriteRefactorings.java:90)
at org.springframework.ide.vscode.commons.languageserver.quickfix.QuickfixRegistry.handle(QuickfixRegistry.java:71)
at org.springframework.ide.vscode.commons.languageserver.util.SimpleLanguageServer.quickfixResolve(SimpleLanguageServer.java:348)
at org.springframework.ide.vscode.commons.languageserver.util.SimpleLanguageServer.executeCommand(SimpleLanguageServer.java:320)
at org.springframework.ide.vscode.commons.languageserver.util.SimpleWorkspaceService.executeCommand(SimpleWorkspaceService.java:157)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
at org.springframework.ide.vscode.commons.languageserver.util.ParentProcessWatcher.lambda$apply$0(ParentProcessWatcher.java:129)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1095)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:619)
at java.base/java.lang.Thread.run(Thread.java:1447)
Caused by: java.lang.ClassNotFoundException: com.sun.tools.javac.code.Type$UnknownType
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:349)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:557)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:490)
at org.openrewrite.java.JavaUnrestrictedClassLoader.loadClass(JavaUnrestrictedClassLoader.java:118)
... 59 common frames omitted
08:36:58.357 [pool-13-thread-1] ERROR o.e.lsp4j.jsonrpc.RemoteEndpoint - Internal error: java.lang.NullPointerException: Property must not be null: edit
java.util.concurrent.CompletionException: java.lang.NullPointerException: Property must not be null: edit
at java.base/java.util.concurrent.CompletableFuture.wrapInCompletionException(CompletableFuture.java:325)
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:378)
at java.base/java.util.concurrent.CompletableFuture.uniAcceptNow(CompletableFuture.java:793)
at java.base/java.util.concurrent.CompletableFuture.uniAcceptStage(CompletableFuture.java:781)
at java.base/java.util.concurrent.CompletableFuture.thenAccept(CompletableFuture.java:2266)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:279)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
at org.springframework.ide.vscode.commons.languageserver.util.ParentProcessWatcher.lambda$apply$0(ParentProcessWatcher.java:129)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1095)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:619)
at java.base/java.lang.Thread.run(Thread.java:1447)
Caused by: java.lang.NullPointerException: Property must not be null: edit
at org.eclipse.lsp4j.util.Preconditions.checkNotNull(Preconditions.java:29)
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Assembly trace from producer [reactor.core.publisher.MonoFlatMap] :
reactor.core.publisher.Mono.flatMap(Mono.java:3179)
org.springframework.ide.vscode.commons.languageserver.util.SimpleLanguageServer.executeCommand(SimpleLanguageServer.java:321)
Error has been observed at the following site(s):
*__Mono.flatMap ⇢ at org.springframework.ide.vscode.commons.languageserver.util.SimpleLanguageServer.executeCommand(SimpleLanguageServer.java:321)
Original Stack Trace:
at org.eclipse.lsp4j.util.Preconditions.checkNotNull(Preconditions.java:29)
at org.eclipse.lsp4j.ApplyWorkspaceEditParams.<init>(ApplyWorkspaceEditParams.java:41)
at org.eclipse.lsp4j.ApplyWorkspaceEditParams.<init>(ApplyWorkspaceEditParams.java:45)
at org.springframework.ide.vscode.commons.languageserver.util.SimpleLanguageServer.lambda$executeCommand$3(SimpleLanguageServer.java:322)
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:132)
at reactor.core.publisher.MonoCompletionStage$MonoCompletionStageSubscription.apply(MonoCompletionStage.java:121)
at reactor.core.publisher.MonoCompletionStage$MonoCompletionStageSubscription.apply(MonoCompletionStage.java:67)
at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:980)
at java.base/java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:996)
at java.base/java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2424)
at java.base/java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:146)
at reactor.core.publisher.MonoCompletionStage$MonoCompletionStageSubscription.request(MonoCompletionStage.java:145)
at reactor.core.publisher.MonoFlatMap$FlatMapMain.request(MonoFlatMap.java:194)
at reactor.core.publisher.MonoToCompletableFuture.onSubscribe(MonoToCompletableFuture.java:53)
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onSubscribe(MonoFlatMap.java:117)
at reactor.core.publisher.MonoCompletionStage.subscribe(MonoCompletionStage.java:56)
at reactor.core.publisher.Mono.subscribe(Mono.java:4576)
at reactor.core.publisher.Mono.subscribeWith(Mono.java:4642)
at reactor.core.publisher.Mono.toFuture(Mono.java:5154)
at org.springframework.ide.vscode.commons.languageserver.util.SimpleLanguageServer.executeCommand(SimpleLanguageServer.java:332)
at org.springframework.ide.vscode.commons.languageserver.util.SimpleWorkspaceService.executeCommand(SimpleWorkspaceService.java:157)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
at org.springframework.ide.vscode.commons.languageserver.util.ParentProcessWatcher.lambda$apply$0(ParentProcessWatcher.java:129)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1095)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:619)
at java.base/java.lang.Thread.run(Thread.java:1447)
The maven project where this interface exists is compiled with jdk17 ... my sts runs with jdk24.
Metadata
Metadata
Assignees
Labels
for: eclipsesomething that is specific for Eclipsefor: vscodesomething that is specific for VSCodetype: bug
Activity
martinlippert commentedon Sep 12, 2025
I can reproduce this issue when running the IDE on top of a JDK 24. It works when running on the embedded JDK 21.
The underlying issue is that
Type.UnknownTypegot removed from the javac implementation here:openjdk/jdk@f0b130e
Which basically means that running the
ReloadableJava21TypeMappingfrom OpenRewrite doesn't work anymore with JDK 24 and beyond. Looks like we need to have a look over there.martinlippert commentedon Sep 12, 2025
Here is the related issue in OpenRewrite: openrewrite/rewrite#4768
martinlippert commentedon Oct 17, 2025
The solution here will be to upgrade to the latest version of the core open-rewrite components, as captured in #1678, It has a number of consequences, but is the logical step moving forward.
I am closing this one here as a duplicate of #1678 for now.