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

NPE when obtaining ConfigValue via getValue #906

Closed
mabartos opened this issue Mar 14, 2023 · 0 comments · Fixed by #907
Closed

NPE when obtaining ConfigValue via getValue #906

mabartos opened this issue Mar 14, 2023 · 0 comments · Fixed by #907

Comments

@mabartos
Copy link
Contributor

mabartos commented Mar 14, 2023

I'm getting NullPointerException when I'm trying to obtain ConfigValue by getValue(...).

ConfigValue for the property is found, but the value inside is null, so it's impossible to process the config value properly.

Caused by: java.lang.NullPointerException: Cannot invoke "String.indexOf(String)" because "value" is null
        at io.smallrye.config.ExpressionConfigSourceInterceptor.escapeDollarIfExists(ExpressionConfigSourceInterceptor.java:85)
        at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:57)
        at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:38)
        at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
        at io.smallrye.config.FallbackConfigSourceInterceptor.getValue(FallbackConfigSourceInterceptor.java:24)
        at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
        at io.smallrye.config.PropertyNamesConfigSourceInterceptor.getValue(PropertyNamesConfigSourceInterceptor.java:17)
        at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
        at io.smallrye.config.SmallRyeConfig.getConfigValue(SmallRyeConfig.java:323)
        at org.keycloak.quarkus.runtime.configuration.Configuration.getConfigValue(Configuration.java:85)

@radcortez Could you please check it? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant