quarkus: RunTimeMappingsConfigBuilder failures (native build/tests) with 2.16.4
Describe the bug
Migrating from 2.13.2 to 2.16.4 with
@ConfigMapping(prefix = "svcat")
interface SvcatConfiguration {
@WithName("class")
Map<String, ClassConfiguration> classes();
interface ClassConfiguration {
String id();
boolean shared();
@WithName("plan")
Map<String, PlanConfiguration> plans();
interface PlanConfiguration {
String id();
Optional<Double> capacity();
}
}
}
produces the below error :
Fatal error: com.oracle.graal.pointsto.util.AnalysisError$ParsingError: Error encountered while parsing io.quarkus.runtime.generated.RunTimeMappingsConfigBuilder.configBuilder(io.smallrye.config.SmallRyeConfigBuilder)
Parsing context:
at io.quarkus.runtime.generated.RunTimeMappingsConfigBuilder.configBuilder(Unknown Source)
at io.quarkus.runtime.configuration.ConfigUtils.configBuilder(ConfigUtils.java:206)
at io.quarkus.runtime.generated.Config.readConfig(Unknown Source)
at io.quarkus.deployment.steps.RuntimeConfigSetup.deploy(Unknown Source)
at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
at io.quarkus.runtime.Application.start(Application.java:101)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:108)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
Caused by: org.graalvm.compiler.java.BytecodeParser$BytecodeParserError: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: SvcatConfiguration. This error is reported at image build time because class io.quarkus.runtime.generated.RunTimeMappingsConfigBuilder is registered for linking at image build time by command line
at parsing io.quarkus.runtime.generated.RunTimeMappingsConfigBuilder.configBuilder(Unknown Source)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.throwParserError(BytecodeParser.java:2518)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.throwParserError(SharedGraphBuilderPhase.java:110)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3393)
...
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Output of uname -a or ver
No response
Output of java -version
No response
GraalVM version (if different from Java)
Version info: ‘GraalVM 22.3.1.0-Final Java 17 Mandrel Distribution’ Java version info: ‘17.0.6+10’ C compiler: gcc (redhat, x86_64, 8.5.0) Garbage collector: Serial GC
Quarkus version or git rev
No response
Build tool (ie. output of mvnw --version or gradlew --version)
No response
Additional information
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 15 (14 by maintainers)
Commits related to this issue
- Merge pull request #31664 from scrocquesel/gh-31554 Use public interface for config mapping in doc — committed to quarkusio/quarkus by gsmet a year ago
- chore(deps): update all non-major dependencies (mulk/quarkus-googlecloud-jsonlogging!15) This MR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [io.quarkus:... — committed to benkard/quarkus-googlecloud-jsonlogging by deleted user a year ago
- Update all non-major dependencies (mulk/mulkcms2!26) This MR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [flow-bin](https://github.com/flowtype/flow-bin)... — committed to benkard/mulkcms2 by deleted user a year ago
Looks like you gave me a good reason to release a 2.16.5 at some point :].
Yes. Well, just the main interface needs to be made public at the moment. It was always like this, but I guess most people either made it public when using BVal, or they never noticed when using default package, because they were not using validation.
I can try to check if I can find a way to make it work with default package and BVal.
Are you refering to this https://quarkus.io/guides/config-mappings#validation ? interfaces and fields should be made public ?
It’s a bit sad because a lot of things support default package like Panache, Resteasy,… and it’s seems to me it was a defacto.