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

Configuration injection regression after migrating from 1.12.2.Final to 2.2.3.Final #20257

Closed
emiste opened this issue Sep 19, 2021 · 9 comments · Fixed by #20103
Closed

Configuration injection regression after migrating from 1.12.2.Final to 2.2.3.Final #20257

emiste opened this issue Sep 19, 2021 · 9 comments · Fixed by #20103
Assignees
Labels
area/config kind/bug Something isn't working
Milestone

Comments

@emiste
Copy link

emiste commented Sep 19, 2021

Describe the bug

I'm getting the following exception after runing a unit test . The same test is OK when using the quarkus's version 1.12.2.Final.
[ERROR] com.xxx.core.api.CustomerSettingResourceTest.shouldCustomerUserLongIn Time elapsed: 0.018 s <<< ERROR!
java.lang.RuntimeException: java.lang.ExceptionInInitializerError
Caused by: java.lang.ExceptionInInitializerError
Caused by: java.lang.RuntimeException: Failed to start quarkus
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Error injecting com.xxx.common.config.XConfig com.xxx.core.security.SecurityContextFilter.applicationConfig
Caused by: java.lang.RuntimeException: Error injecting com.xxx.common.config.XConfig com.xxx.core.security.SecurityContextFilter.applicationConfig
Caused by: java.util.NoSuchElementException: SRCFG00027: Could not find a mapping for com.xxx.common.config.XConfig

mybe the issue is related to the fact that com.xxx.core.security.SecurityContextFilter implements javax.ws.rs.container.ContainerRequestFilter

NB: The exception is not raised when using the quarkus's version 2.2.1.Final ( the regression is present in 2.2.2.Final and 2.2.3.Final)

Expected behavior

Be able to inject configuration inside a ContainerRequestFilter provider

Actual behavior

Configuration is not injected an exception is raised

How to Reproduce?

please clone the following repo : https://github.com/emiste/quarkus.git
run ./mvn install inside the folder reproducer-20257-with-quarkus-2.2.3.Final to get the exception
run ./mvn install inside the folder reproducer-20257-with-quarkus-2.2.1.Final to get build success

Output of uname -a or ver

No response

Output of java -version

java 11.0.4 2019-07-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.4+10-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.4+10-LTS, mixed mode)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

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

Maven home: C:\Users\xxx.m2\wrapper\dists\apache-maven-3.8.1-bin\2l5mhf2pq2clrde7f7qp1rdt5m\apache-maven-3.8.1
Java version: 11.0.4, vendor: Oracle Corporation, runtime: C:\tools\Java\jdk-11.0.4
Default locale: fr_FR, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Additional information

The exception is not raised when using the quarkus's version 2.2.1.Final ( the regression is present in 2.2.2.Final and 2.2.3.Final)

@emiste emiste added the kind/bug Something isn't working label Sep 19, 2021
@quarkus-bot quarkus-bot bot added the area/arc Issue related to ARC (dependency injection) label Sep 19, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Sep 19, 2021

/cc @manovotn, @mkouba

@mkouba
Copy link
Contributor

mkouba commented Sep 20, 2021

CC @radcortez

@radcortez
Copy link
Member

This seems related to the revert of #19937, but can only be sure if I have a reproducer. @emiste are you able to provide one? Thanks!

@radcortez radcortez added area/config and removed area/arc Issue related to ARC (dependency injection) area/smallrye labels Sep 20, 2021
@radcortez radcortez self-assigned this Sep 20, 2021
@emiste
Copy link
Author

emiste commented Sep 21, 2021

@radcortez I'll try to create a reproducer asap.
Thanks

@emiste
Copy link
Author

emiste commented Sep 26, 2021

@radcortez please checkout the reproducer from my githhub account
thanks

@radcortez
Copy link
Member

Yes, this works with #20103 (not merged yet).

@emiste
Copy link
Author

emiste commented Oct 15, 2021

I'm still facing the same regression in 2.3.0.Final .

@geoand
Copy link
Contributor

geoand commented Oct 15, 2021

Can you open a new issue?

@emiste
Copy link
Author

emiste commented Oct 15, 2021

yes . The new issue id is #20788

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

Successfully merging a pull request may close this issue.

4 participants