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

Application tests failing w/ Quarkus 3.13.0 + io.smallrye.config:smallrye-config-source-keystore #42240

Closed
snazy opened this issue Jul 31, 2024 · 23 comments · Fixed by #42264
Closed
Labels
Milestone

Comments

@snazy
Copy link
Contributor

snazy commented Jul 31, 2024

Describe the bug

All @QuarkusTest and @QuarkusIntegrationTest fail with an NPE at SmallRyeConfig.java:751.

Quarkus 3.12.3 worked fine.

Expected behavior

No response

Actual behavior

Full stack trace

java.lang.NullPointerException: Cannot read field "interceptorChain" because "this.configSources" is null
java.lang.RuntimeException: java.lang.NullPointerException: Cannot read field "interceptorChain" because "this.configSources" is null
	at io.quarkus.test.junit.QuarkusTestExtension.throwBootFailureException(QuarkusTestExtension.java:634)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptTestClassConstructor(QuarkusTestExtension.java:718)
	at java.base/java.util.Optional.orElseGet(Optional.java:364)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
Caused by: java.lang.NullPointerException: Cannot read field "interceptorChain" because "this.configSources" is null
	at io.smallrye.config.SmallRyeConfig.interceptorChain(SmallRyeConfig.java:751)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.restart(SmallRyeConfigSourceInterceptorContext.java:33)
	at io.quarkus.deployment.configuration.ConfigCompatibility.quarkusPackageJarManifestAddImplementationEntries(ConfigCompatibility.java:494)
	at io.quarkus.deployment.configuration.ConfigCompatibility$BackEnd.getValue(ConfigCompatibility.java:211)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:25)
	at io.smallrye.config.SmallRyeConfigSources.getValue(SmallRyeConfigSources.java:41)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:25)
	at io.smallrye.config.SecretKeysConfigSourceInterceptor.getValue(SecretKeysConfigSourceInterceptor.java:26)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:25)
	at io.smallrye.config.RelocateConfigSourceInterceptor.getValue(RelocateConfigSourceInterceptor.java:25)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:25)
	at io.smallrye.config.RelocateConfigSourceInterceptor.getValue(RelocateConfigSourceInterceptor.java:25)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:25)
	at io.smallrye.config.RelocateConfigSourceInterceptor.getValue(RelocateConfigSourceInterceptor.java:25)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:25)
	at io.smallrye.config.ProfileConfigSourceInterceptor.getValue(ProfileConfigSourceInterceptor.java:46)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:25)
	at io.smallrye.config.LoggingConfigSourceInterceptor.getValue(LoggingConfigSourceInterceptor.java:26)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:25)
	at io.smallrye.config.LoggingConfigSourceInterceptor.getValue(LoggingConfigSourceInterceptor.java:26)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:25)
	at org.projectnessie.quarkus.config.datasource.JdbcUrlInterceptor.getValue(JdbcUrlInterceptor.java:36)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:25)
	at io.smallrye.config.RelocateConfigSourceInterceptor.getValue(RelocateConfigSourceInterceptor.java:25)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:25)
	at io.smallrye.config.RelocateConfigSourceInterceptor.getValue(RelocateConfigSourceInterceptor.java:25)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:25)
	at io.smallrye.config.RelocateConfigSourceInterceptor.getValue(RelocateConfigSourceInterceptor.java:25)
	at io.quarkus.smallrye.openapi.runtime.OpenApiConfigMapping.getValue(OpenApiConfigMapping.java:32)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:25)
	at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:53)
	at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:45)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:25)
	at io.quarkus.opentelemetry.runtime.config.HierarchicalOTelConnectionConfigInterceptor.iterateNames(HierarchicalOTelConnectionConfigInterceptor.java:56)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.iterateNames(SmallRyeConfigSourceInterceptorContext.java:44)
	at io.smallrye.config.ConfigSourceInterceptor.iterateNames(ConfigSourceInterceptor.java:55)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.iterateNames(SmallRyeConfigSourceInterceptorContext.java:44)
	at io.quarkus.runtime.configuration.QuarkusConfigBuilderCustomizer$3$1.iterateNames(QuarkusConfigBuilderCustomizer.java:101)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.iterateNames(SmallRyeConfigSourceInterceptorContext.java:44)
	at io.smallrye.config.AbstractMappingConfigSourceInterceptor.iterateNames(AbstractMappingConfigSourceInterceptor.java:30)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.iterateNames(SmallRyeConfigSourceInterceptorContext.java:44)
	at io.smallrye.config.ConfigSourceInterceptor.iterateNames(ConfigSourceInterceptor.java:55)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.iterateNames(SmallRyeConfigSourceInterceptorContext.java:44)
	at io.smallrye.config.ConfigSourceInterceptor.iterateNames(ConfigSourceInterceptor.java:55)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.iterateNames(SmallRyeConfigSourceInterceptorContext.java:44)
	at io.smallrye.config.ConfigSourceInterceptor.iterateNames(ConfigSourceInterceptor.java:55)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.iterateNames(SmallRyeConfigSourceInterceptorContext.java:44)
	at io.quarkus.deployment.configuration.ConfigCompatibility$FrontEnd.iterateNames(ConfigCompatibility.java:132)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.iterateNames(SmallRyeConfigSourceInterceptorContext.java:44)
	at io.smallrye.config.SmallRyeConfig$SmallRyeConfigSourceContext.iterateNames(SmallRyeConfig.java:1091)
	at io.smallrye.config.ConfigSourceContext$ConfigSourceContextConfigSource.getPropertyNames(ConfigSourceContext.java:36)
	at io.smallrye.config.SmallRyeConfig.matchPropertiesWithEnv(SmallRyeConfig.java:148)
	at io.smallrye.config.SmallRyeConfig.<init>(SmallRyeConfig.java:91)
	at io.smallrye.config.SmallRyeConfigBuilder.build(SmallRyeConfigBuilder.java:736)
	at io.smallrye.config.source.keystore.KeyStoreConfigSourceFactory.getKeyStoreConfig(KeyStoreConfigSourceFactory.java:90)
	at io.smallrye.config.source.keystore.KeyStoreConfigSourceFactory.getConfigSources(KeyStoreConfigSourceFactory.java:38)
	at io.smallrye.config.ConfigurableConfigSource.getConfigSources(ConfigurableConfigSource.java:50)
	at io.smallrye.config.SmallRyeConfig$ConfigSources.mapLateSources(SmallRyeConfig.java:935)
	at io.smallrye.config.SmallRyeConfig$ConfigSources.<init>(SmallRyeConfig.java:803)
	at io.smallrye.config.SmallRyeConfig.<init>(SmallRyeConfig.java:85)
	at io.smallrye.config.SmallRyeConfigBuilder.build(SmallRyeConfigBuilder.java:736)
	at io.quarkus.deployment.configuration.BuildTimeConfigurationReader.initConfiguration(BuildTimeConfigurationReader.java:410)
	at io.quarkus.deployment.ExtensionLoader.loadStepsFrom(ExtensionLoader.java:137)
	at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:106)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:331)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:254)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:58)
	at io.quarkus.test.junit.QuarkusTestExtension.doJavaStart(QuarkusTestExtension.java:219)
	at io.quarkus.test.junit.QuarkusTestExtension.ensureStarted(QuarkusTestExtension.java:601)
	at io.quarkus.test.junit.QuarkusTestExtension.beforeAll(QuarkusTestExtension.java:651)
	... 1 more

How to Reproduce?

  1. git clone https://github.com/projectnessie/nessie.git
  2. git checkout renovate/quarkusplatform
  3. ./gradlew :nessie-quarkus:test --tests TestBasicOperations

Output of uname -a or ver

No response

Output of java -version

21

Quarkus version or git rev

4.13.0

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

Gradle 8.9

Additional information

No response

@snazy
Copy link
Contributor Author

snazy commented Jul 31, 2024

Hmm.
So it happens via
io.quarkus.test.junit.BasicLoggingEnabler#buildConfig (line 100)
then via
io.smallrye.config.SmallRyeConfig.ConfigSources#mapLateSources (line 916)
where it has a config with configSources == null, probably because it's called via
io.smallrye.config.SmallRyeConfig#SmallRyeConfig, where this.configSources isn't initialized and therefore null.

@gsmet
Copy link
Member

gsmet commented Jul 31, 2024

@radcortez I suspect this is one for you?

@mkouba
Copy link
Contributor

mkouba commented Jul 31, 2024

Yes, smallrye/smallrye-config#1082 looks suspicious but it's in Quarkus since 3.9 🤷

CC @dmlloyd

@gsmet
Copy link
Member

gsmet commented Jul 31, 2024

@radcortez Could you clarify if it's a corner case? Because if not, we might have to respin 3.13.

@snazy
Copy link
Contributor Author

snazy commented Jul 31, 2024

Ah - could be related to a "specialty" in how we run time tests.
We have org.projectnessie.junit.engine.MultiEnvTestEngine which is there to run the same tests using different "environments" (not really "environments", but rather configs/settings).

@snazy
Copy link
Contributor Author

snazy commented Jul 31, 2024

Hm - what does junit.quarkus.enable-basic-logging do?

@snazy
Copy link
Contributor Author

snazy commented Jul 31, 2024

Looking at the static init in BasicLoggingEnabler

@snazy
Copy link
Contributor Author

snazy commented Jul 31, 2024

But passing the uninitialized this from SmallRyeConfig.<init>() to ConfigSources.<init>() isn't correct IMO, because configSources is guaranteed to be null there

@radcortez
Copy link
Member

@radcortez Could you clarify if it's a corner case? Because if not, we might have to respin 3.13.

Might be some combination that we are not aware. The code is already in Quarkus for some time:

#39295
#39058
smallrye/smallrye-config#1082

I'll have a look.

@snazy
Copy link
Contributor Author

snazy commented Jul 31, 2024

This might be interesting:
image

@radcortez
Copy link
Member

It still doesn't explain why it worked in the previous version, considering that the probable causes were already there some time ago.

@snazy
Copy link
Contributor Author

snazy commented Jul 31, 2024

The 1st SmallryeConfig is still being built and hence its configSources is still null.
And then io.smallrye.config.source.keystore.KeyStoreConfigSourceFactory#getKeyStoreConfig kicks in and builds another SmallryeConfig having a ConfigSourceContext with the only partly built 1st instance.

@snazy
Copy link
Contributor Author

snazy commented Jul 31, 2024

It still doesn't explain why it worked in the previous version, considering that the probable causes were already there some time ago.

Right - all related parts are "old".

@snazy
Copy link
Contributor Author

snazy commented Jul 31, 2024

With 3.12.3 I don't see KeyStoreConfigSourceFactory in the stack trace.

@snazy
Copy link
Contributor Author

snazy commented Jul 31, 2024

This is the stack trace up to quarkusPackageJarManifestAddImplementationEntries: for 3.12.3:

quarkusPackageJarManifestAddImplementationEntries:494, ConfigCompatibility (io.quarkus.deployment.configuration)
apply:-1, ConfigCompatibility$$Lambda/0x00007fea302d9180 (io.quarkus.deployment.configuration)
getValue:211, ConfigCompatibility$BackEnd (io.quarkus.deployment.configuration)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:41, SmallRyeConfigSources (io.smallrye.config)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:26, SecretKeysConfigSourceInterceptor (io.smallrye.config)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:25, RelocateConfigSourceInterceptor (io.smallrye.config)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:25, RelocateConfigSourceInterceptor (io.smallrye.config)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:25, RelocateConfigSourceInterceptor (io.smallrye.config)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:46, ProfileConfigSourceInterceptor (io.smallrye.config)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:26, LoggingConfigSourceInterceptor (io.smallrye.config)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:26, LoggingConfigSourceInterceptor (io.smallrye.config)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:36, JdbcUrlInterceptor (org.projectnessie.quarkus.config.datasource)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:25, RelocateConfigSourceInterceptor (io.smallrye.config)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:25, RelocateConfigSourceInterceptor (io.smallrye.config)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:25, RelocateConfigSourceInterceptor (io.smallrye.config)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:25, RelocateConfigSourceInterceptor (io.smallrye.config)
getValue:32, OpenApiConfigMapping (io.quarkus.smallrye.openapi.runtime)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:53, ExpressionConfigSourceInterceptor (io.smallrye.config)
getValue:45, ExpressionConfigSourceInterceptor (io.smallrye.config)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:24, FallbackConfigSourceInterceptor (io.smallrye.config)
getValue:45, OTelFallbackConfigSourceInterceptor (io.quarkus.opentelemetry.runtime.config)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:48, DataSourceActivator (org.projectnessie.quarkus.config.datasource)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:24, FallbackConfigSourceInterceptor (io.smallrye.config)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:24, FallbackConfigSourceInterceptor (io.smallrye.config)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:24, FallbackConfigSourceInterceptor (io.smallrye.config)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:74, ConfigTrackingInterceptor (io.quarkus.deployment.configuration.tracker)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:35, OpenTelemetryConfigSourceInterceptor (org.projectnessie.quarkus.config)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:26, MpTelemetryRelocateConfigSourceInterceptor$1 (io.quarkus.opentelemetry.runtime.config)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getValue:128, ConfigCompatibility$FrontEnd (io.quarkus.deployment.configuration)
proceed:25, SmallRyeConfigSourceInterceptorContext (io.smallrye.config)
getConfigValue:448, SmallRyeConfig (io.smallrye.config)
getValue:368, SmallRyeConfig (io.smallrye.config)
apply:669, ConfigMappingContext$ObjectCreator$9 (io.smallrye.config)
apply:664, ConfigMappingContext$ObjectCreator$9 (io.smallrye.config)
accept:413, ConfigMappingContext$ObjectCreator$1 (io.smallrye.config)
accept:410, ConfigMappingContext$ObjectCreator$1 (io.smallrye.config)
value:664, ConfigMappingContext$ObjectCreator (io.smallrye.config)
<init>:-1, PackageConfig$JarConfig$ManifestConfig-161937987Impl (io.quarkus.deployment.pkg)
newInvokeSpecial:-1, DirectMethodHandle$Holder (java.lang.invoke)
invoke:-1, LambdaForm$MH/0x00007fea30010000 (java.lang.invoke)
invokeExact_MT:-1, Invokers$Holder (java.lang.invoke)
invokeImpl:87, DirectConstructorHandleAccessor (jdk.internal.reflect)
newInstance:62, DirectConstructorHandleAccessor (jdk.internal.reflect)
newInstanceWithCaller:502, Constructor (java.lang.reflect)
newInstance:486, Constructor (java.lang.reflect)
configMappingObject:108, ConfigMappingLoader (io.smallrye.config)
constructGroup:93, ConfigMappingContext (io.smallrye.config)
apply:609, ConfigMappingContext$ObjectCreator$6 (io.smallrye.config)
apply:603, ConfigMappingContext$ObjectCreator$6 (io.smallrye.config)
accept:413, ConfigMappingContext$ObjectCreator$1 (io.smallrye.config)
accept:410, ConfigMappingContext$ObjectCreator$1 (io.smallrye.config)
group:603, ConfigMappingContext$ObjectCreator (io.smallrye.config)
<init>:-1, PackageConfig$JarConfig1451928280Impl (io.quarkus.deployment.pkg)
newInvokeSpecial:-1, DirectMethodHandle$Holder (java.lang.invoke)
invoke:-1, LambdaForm$MH/0x00007fea30010000 (java.lang.invoke)
invokeExact_MT:-1, Invokers$Holder (java.lang.invoke)
invokeImpl:87, DirectConstructorHandleAccessor (jdk.internal.reflect)
newInstance:62, DirectConstructorHandleAccessor (jdk.internal.reflect)
newInstanceWithCaller:502, Constructor (java.lang.reflect)
newInstance:486, Constructor (java.lang.reflect)
configMappingObject:108, ConfigMappingLoader (io.smallrye.config)
constructGroup:93, ConfigMappingContext (io.smallrye.config)
apply:609, ConfigMappingContext$ObjectCreator$6 (io.smallrye.config)
apply:603, ConfigMappingContext$ObjectCreator$6 (io.smallrye.config)
accept:413, ConfigMappingContext$ObjectCreator$1 (io.smallrye.config)
accept:410, ConfigMappingContext$ObjectCreator$1 (io.smallrye.config)
group:603, ConfigMappingContext$ObjectCreator (io.smallrye.config)
<init>:-1, PackageConfig-1976486881Impl (io.quarkus.deployment.pkg)
newInvokeSpecial:-1, DirectMethodHandle$Holder (java.lang.invoke)
invoke:-1, LambdaForm$MH/0x00007fea30010000 (java.lang.invoke)
invokeExact_MT:-1, Invokers$Holder (java.lang.invoke)
invokeImpl:87, DirectConstructorHandleAccessor (jdk.internal.reflect)
newInstance:62, DirectConstructorHandleAccessor (jdk.internal.reflect)
newInstanceWithCaller:502, Constructor (java.lang.reflect)
newInstance:486, Constructor (java.lang.reflect)
configMappingObject:108, ConfigMappingLoader (io.smallrye.config)
constructGroup:93, ConfigMappingContext (io.smallrye.config)
constructRoot:88, ConfigMappingContext (io.smallrye.config)
<init>:81, ConfigMappingContext (io.smallrye.config)
<init>:50, ConfigMappingContext (io.smallrye.config)
get:128, SmallRyeConfig$1 (io.smallrye.config)
get:125, SmallRyeConfig$1 (io.smallrye.config)
doUnlocked:28, SecretKeys (io.smallrye.config)
buildMappings:125, SmallRyeConfig (io.smallrye.config)
<init>:92, SmallRyeConfig (io.smallrye.config)
build:691, SmallRyeConfigBuilder (io.smallrye.config)
initConfiguration:418, BuildTimeConfigurationReader (io.quarkus.deployment.configuration)
loadStepsFrom:137, ExtensionLoader (io.quarkus.deployment)
run:107, QuarkusAugmentor (io.quarkus.deployment)
runAugment:327, AugmentActionImpl (io.quarkus.runner.bootstrap)
createInitialRuntimeApplication:252, AugmentActionImpl (io.quarkus.runner.bootstrap)
createInitialRuntimeApplication:58, AugmentActionImpl (io.quarkus.runner.bootstrap)
doJavaStart:223, QuarkusTestExtension (io.quarkus.test.junit)
ensureStarted:609, QuarkusTestExtension (io.quarkus.test.junit)
beforeAll:659, QuarkusTestExtension (io.quarkus.test.junit)
lambda$invokeBeforeAllCallbacks$12:396, ClassBasedTestDescriptor (org.junit.jupiter.engine.descriptor)
execute:-1, ClassBasedTestDescriptor$$Lambda/0x00007fea301b96a8 (org.junit.jupiter.engine.descriptor)
execute:73, ThrowableCollector (org.junit.platform.engine.support.hierarchical)
invokeBeforeAllCallbacks:396, ClassBasedTestDescriptor (org.junit.jupiter.engine.descriptor)
before:212, ClassBasedTestDescriptor (org.junit.jupiter.engine.descriptor)
before:85, ClassBasedTestDescriptor (org.junit.jupiter.engine.descriptor)
lambda$executeRecursively$6:148, NodeTestTask (org.junit.platform.engine.support.hierarchical)
execute:-1, NodeTestTask$$Lambda/0x00007fea30193508 (org.junit.platform.engine.support.hierarchical)
execute:73, ThrowableCollector (org.junit.platform.engine.support.hierarchical)
lambda$executeRecursively$8:141, NodeTestTask (org.junit.platform.engine.support.hierarchical)
invoke:-1, NodeTestTask$$Lambda/0x00007fea301932e0 (org.junit.platform.engine.support.hierarchical)
around:137, Node (org.junit.platform.engine.support.hierarchical)
lambda$executeRecursively$9:139, NodeTestTask (org.junit.platform.engine.support.hierarchical)
execute:-1, NodeTestTask$$Lambda/0x00007fea30192eb8 (org.junit.platform.engine.support.hierarchical)
execute:73, ThrowableCollector (org.junit.platform.engine.support.hierarchical)
executeRecursively:138, NodeTestTask (org.junit.platform.engine.support.hierarchical)
execute:95, NodeTestTask (org.junit.platform.engine.support.hierarchical)
accept:-1, SameThreadHierarchicalTestExecutorService$$Lambda/0x00007fea3019a7c0 (org.junit.platform.engine.support.hierarchical)
forEach:1596, ArrayList (java.util)
invokeAll:41, SameThreadHierarchicalTestExecutorService (org.junit.platform.engine.support.hierarchical)
lambda$executeRecursively$6:155, NodeTestTask (org.junit.platform.engine.support.hierarchical)
execute:-1, NodeTestTask$$Lambda/0x00007fea30193508 (org.junit.platform.engine.support.hierarchical)
execute:73, ThrowableCollector (org.junit.platform.engine.support.hierarchical)
lambda$executeRecursively$8:141, NodeTestTask (org.junit.platform.engine.support.hierarchical)
invoke:-1, NodeTestTask$$Lambda/0x00007fea301932e0 (org.junit.platform.engine.support.hierarchical)
around:137, Node (org.junit.platform.engine.support.hierarchical)
lambda$executeRecursively$9:139, NodeTestTask (org.junit.platform.engine.support.hierarchical)
execute:-1, NodeTestTask$$Lambda/0x00007fea30192eb8 (org.junit.platform.engine.support.hierarchical)
execute:73, ThrowableCollector (org.junit.platform.engine.support.hierarchical)
executeRecursively:138, NodeTestTask (org.junit.platform.engine.support.hierarchical)
execute:95, NodeTestTask (org.junit.platform.engine.support.hierarchical)
submit:35, SameThreadHierarchicalTestExecutorService (org.junit.platform.engine.support.hierarchical)
execute:57, HierarchicalTestExecutor (org.junit.platform.engine.support.hierarchical)
execute:54, HierarchicalTestEngine (org.junit.platform.engine.support.hierarchical)
execute:198, EngineExecutionOrchestrator (org.junit.platform.launcher.core)
execute:169, EngineExecutionOrchestrator (org.junit.platform.launcher.core)
execute:93, EngineExecutionOrchestrator (org.junit.platform.launcher.core)
lambda$execute$0:58, EngineExecutionOrchestrator (org.junit.platform.launcher.core)
accept:-1, EngineExecutionOrchestrator$$Lambda/0x00007fea3014b798 (org.junit.platform.launcher.core)
withInterceptedStreams:141, EngineExecutionOrchestrator (org.junit.platform.launcher.core)
execute:57, EngineExecutionOrchestrator (org.junit.platform.launcher.core)
execute:103, DefaultLauncher (org.junit.platform.launcher.core)
execute:85, DefaultLauncher (org.junit.platform.launcher.core)
execute:47, DelegatingLauncher (org.junit.platform.launcher.core)
processAllTestClasses:124, JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor (org.gradle.api.internal.tasks.testing.junitplatform)
access$000:99, JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor (org.gradle.api.internal.tasks.testing.junitplatform)
stop:94, JUnitPlatformTestClassProcessor (org.gradle.api.internal.tasks.testing.junitplatform)
stop:63, SuiteTestClassProcessor (org.gradle.api.internal.tasks.testing)
invokeInterface:-1, LambdaForm$DMH/0x00007fea300bc000 (java.lang.invoke)
invoke:-1, LambdaForm$MH/0x00007fea300bc800 (java.lang.invoke)
invokeExact_MT:-1, Invokers$Holder (java.lang.invoke)
invokeImpl:153, DirectMethodHandleAccessor (jdk.internal.reflect)
invoke:103, DirectMethodHandleAccessor (jdk.internal.reflect)
invoke:580, Method (java.lang.reflect)
dispatch:36, ReflectionDispatch (org.gradle.internal.dispatch)
dispatch:24, ReflectionDispatch (org.gradle.internal.dispatch)
dispatch:33, ContextClassLoaderDispatch (org.gradle.internal.dispatch)
invoke:92, ProxyDispatchAdapter$DispatchingInvocationHandler (org.gradle.internal.dispatch)
stop:-1, $Proxy4 (jdk.proxy1)
run:198, TestWorker$3 (org.gradle.api.internal.tasks.testing.worker)
executeAndMaintainThreadName:130, TestWorker (org.gradle.api.internal.tasks.testing.worker)
execute:101, TestWorker (org.gradle.api.internal.tasks.testing.worker)
execute:61, TestWorker (org.gradle.api.internal.tasks.testing.worker)
execute:56, ActionExecutionWorker (org.gradle.process.internal.worker.child)
call:122, SystemApplicationClassLoaderWorker (org.gradle.process.internal.worker.child)
call:69, SystemApplicationClassLoaderWorker (org.gradle.process.internal.worker.child)
run:69, GradleWorkerMain (worker.org.gradle.process.internal.worker)
main:74, GradleWorkerMain (worker.org.gradle.process.internal.worker)

@snazy
Copy link
Contributor Author

snazy commented Jul 31, 2024

Yep! It only happens with 3.13.0 if io.smallrye.config:smallrye-config-source-keystore is on the classpath.

@snazy snazy changed the title Application tests failing w/ Quarkus 3.13.0 Application tests failing w/ Quarkus 3.13.0 + io.smallrye.config:smallrye-config-source-keystore Jul 31, 2024
@radcortez
Copy link
Member

But there must be something else... from the code, the issue should also happen in older versions.

@radcortez
Copy link
Member

You can probably work around this by avoiding the call to the ConfigCompatibility, by using the new quarkus.package.jar.* names:

https://github.com/projectnessie/nessie/blob/a9028f12c5152ebc14ba32731b52fdc9a107db94/servers/quarkus-server/build.gradle.kts#L186-L195

Using the old name triggers the interceptor call which causes the issue (in combination with all the other stuff).

@snazy
Copy link
Contributor Author

snazy commented Jul 31, 2024

Unfortunately the workaround doesn't help :(
Looks like ConfigCompatibility stuff is triggered every time when a quarkus.package.jar.* propertiy is queried.
In my case, it fails during the .restart() for quarkus.package.manifest.add-implementation-entries.

@radcortez
Copy link
Member

Yes, so in theory, if you replace all of the old name references with the new ones, the compatibility should not be triggered.

@radcortez
Copy link
Member

Anyway, I'm working on a fix... this was to avoid waiting for one.

@snazy
Copy link
Contributor Author

snazy commented Jul 31, 2024

Anyway, I'm working on a fix... this was to avoid waiting for one.

LMK if you need a review or so

@snazy
Copy link
Contributor Author

snazy commented Jul 31, 2024

Looks like smallrye/smallrye-config#1205 solves the issue

snazy added a commit to snazy/quarkus that referenced this issue Aug 1, 2024
@quarkus-bot quarkus-bot bot added this to the 3.14 - main milestone Aug 1, 2024
@gsmet gsmet modified the milestones: 3.14 - main, 3.13.1 Aug 1, 2024
gsmet pushed a commit to gsmet/quarkus that referenced this issue Aug 1, 2024
danielsoro pushed a commit to danielsoro/quarkus that referenced this issue Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants