Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot-reload fails with ConfigMapping in ContainerRequestFilter #20957

Closed
vizmo opened this issue Oct 23, 2021 · 1 comment · Fixed by #20980
Closed

Hot-reload fails with ConfigMapping in ContainerRequestFilter #20957

vizmo opened this issue Oct 23, 2021 · 1 comment · Fixed by #20980
Assignees
Labels
area/config env/windows Impacts Windows machines kind/bug Something isn't working
Milestone

Comments

@vizmo
Copy link

vizmo commented Oct 23, 2021

Describe the bug

I'm injecting a ConfigMapping in a ContainerRequestFilter. The initial application startup works and I can invoke my REST endpoints without any problems. When I make a change to the code, quarkus hot-reloads upon the next request but the reload fails.

Expected behavior

Hot-reload should load the config the same way as the initial load does.

Actual behavior

Upon hot-reload I see a NoSuchElementException:

Caused by: java.util.NoSuchElementException: SRCFG00027: Could not find a mapping for org.acme.MyConfig at io.smallrye.config.ConfigMappings.getConfigMapping(ConfigMappings.java:100) at io.smallrye.config.SmallRyeConfig.getConfigMapping(SmallRyeConfig.java:398) at io.quarkus.arc.runtime.ConfigMappingCreator.create(ConfigMappingCreator.java:28) at org.acme.MyConfig_bcfb30ea94df0bb5f64f23dfaa52b4e519ed945b_Synthetic_Bean.create(MyConfig_bcfb30ea94df0bb5f64f23dfaa52b4e519ed945b_S ynthetic_Bean.zig:128) at org.acme.MyConfig_bcfb30ea94df0bb5f64f23dfaa52b4e519ed945b_Synthetic_Bean.get(MyConfig_bcfb30ea94df0bb5f64f23dfaa52b4e519ed945b_Synthetic_Bean.zig:159) at org.acme.MyConfig_bcfb30ea94df0bb5f64f23dfaa52b4e519ed945b_Synthetic_Bean.get(MyConfig_bcfb30ea94df0bb5f64f23dfaa52b4e519ed945b_Synthetic_Bean.zig:182) at io.quarkus.arc.impl.CurrentInjectionPointProvider.get(CurrentInjectionPointProvider.java:52) at org.acme.MyFilter_Bean.create(MyFilter_Bean.zig:241) ... 57 more

How to Reproduce?

I've created a minimal reproducer with just one resource, filter, ConfigMapping and properties file.

Run it in dev mode and get the /hello path. That works. Then make any change to the code and try again. That won’t work.

Output of uname -a or ver

Microsoft Windows [Version 10.0.19042.1237]

Output of java -version

openjdk version "17" 2021-09-14 OpenJDK Runtime Environment (build 17+35-2724) OpenJDK 64-Bit Server VM (build 17+35-2724, mixed mode, sharing)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.3.1.FINAL

Build tool (ie. output of mvnw --version or gradlew --version)

Maven home: C:\Users\morit.m2\wrapper\dists\apache-maven-3.8.1-bin\2l5mhf2pq2clrde7f7qp1rdt5m\apache-maven-3.8.1 Java version: 17, vendor: Oracle Corporation, runtime: C:\Users\morit\scoop\apps\openjdk17\current Default locale: en_US, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Additional information

No response

@vizmo vizmo added the kind/bug Something isn't working label Oct 23, 2021
@quarkus-bot quarkus-bot bot added env/windows Impacts Windows machines triage/needs-triage labels Oct 23, 2021
@stuartwdouglas
Copy link
Member

This looks like a config issue rather than a RESTEasy one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/config env/windows Impacts Windows machines kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants