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

Micronaut 4.3.0+ and Micronaut GCP 5.4.0 Causes Stackoverflow on Startup #1045

Closed
jjathman opened this issue Feb 12, 2024 · 5 comments · Fixed by #1049
Closed

Micronaut 4.3.0+ and Micronaut GCP 5.4.0 Causes Stackoverflow on Startup #1045

jjathman opened this issue Feb 12, 2024 · 5 comments · Fixed by #1049
Assignees
Labels
info: workaround available A workaround is available for the issue type: bug Something isn't working

Comments

@jjathman
Copy link
Contributor

jjathman commented Feb 12, 2024

Expected Behavior

Application which starts correctly with GCP tracing enabled.

Actual Behaviour

With an application using Micronaut GCP 5.4.0 that has Stackdriver tracing enabled will receive a stack overflow at startup.

Stacktrace:

Caused by: java.lang.StackOverflowError: null
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
	at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862)
	at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	at io.micronaut.context.exceptions.BeanInstantiationException.<init>(BeanInstantiationException.java:49)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2345)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1750)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1732)
	at io.micronaut.http.client.netty.$DefaultNettyHttpClientRegistry$HttpClient0$Definition.doInstantiate(Unknown Source)
	at io.micronaut.context.AbstractInitializableBeanDefinition.instantiate(AbstractInitializableBeanDefinition.java:774)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2328)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:1089)
	at io.micronaut.context.DefaultBeanContext.createBean(DefaultBeanContext.java:1069)
	at io.micronaut.context.BeanContext.createBean(BeanContext.java:157)
	at io.micronaut.gcp.credentials.DefaultOAuth2HttpTransportFactory.<init>(DefaultOAuth2HttpTransportFactory.java:71)
	at io.micronaut.gcp.credentials.$DefaultOAuth2HttpTransportFactory$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.findBean(DefaultBeanContext.java:1813)
	at io.micronaut.context.AbstractBeanResolutionContext.findBean(AbstractBeanResolutionContext.java:112)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2163)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at io.micronaut.gcp.credentials.$GoogleCredentialsFactory$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1750)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1732)
	at io.micronaut.gcp.credentials.$GoogleCredentialsFactory$DefaultGoogleCredentials0$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1750)
	at io.micronaut.context.AbstractBeanResolutionContext.getBean(AbstractBeanResolutionContext.java:89)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2165)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at io.micronaut.gcp.tracing.zipkin.$StackdriverSenderFactory$StackdriverSender1$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1750)
	at io.micronaut.context.AbstractBeanResolutionContext.getBean(AbstractBeanResolutionContext.java:89)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2165)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at io.micronaut.tracing.brave.$AsyncReporterConfiguration$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1750)
	at io.micronaut.context.AbstractBeanResolutionContext.getBean(AbstractBeanResolutionContext.java:89)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2165)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at io.micronaut.gcp.tracing.zipkin.$StackdriverSenderFactory$StackdriverReporter4$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.findBean(DefaultBeanContext.java:1813)
	at io.micronaut.context.AbstractBeanResolutionContext.findBean(AbstractBeanResolutionContext.java:112)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2163)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at io.micronaut.tracing.brave.$BraveTracerFactory$BraveTracing0$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1750)
	at io.micronaut.context.AbstractBeanResolutionContext.getBean(AbstractBeanResolutionContext.java:89)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2165)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at io.micronaut.tracing.brave.http.$HttpTracingFactory$HttpTracing0$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1750)
	at io.micronaut.context.AbstractBeanResolutionContext.getBean(AbstractBeanResolutionContext.java:89)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2165)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at io.micronaut.tracing.brave.http.$HttpTracingFactory$HttpClientHandler1$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1750)
	at io.micronaut.context.AbstractBeanResolutionContext.getBean(AbstractBeanResolutionContext.java:89)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2165)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at io.micronaut.tracing.brave.http.$BraveTracingClientFilter$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2951)
	at io.micronaut.context.DefaultBeanContext.addCandidateToList(DefaultBeanContext.java:3566)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistrations(DefaultBeanContext.java:3514)
	at io.micronaut.context.DefaultBeanContext.getBeanRegistrations(DefaultBeanContext.java:3484)
	at io.micronaut.context.DefaultBeanContext.getBeansOfType(DefaultBeanContext.java:1451)
	at io.micronaut.context.AbstractBeanResolutionContext.getBeansOfType(AbstractBeanResolutionContext.java:95)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBeansOfType(AbstractInitializableBeanDefinition.java:2253)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeansOfTypeForConstructorArgument(AbstractInitializableBeanDefinition.java:1476)
	at io.micronaut.http.client.filter.$DefaultHttpClientFilterResolver$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1750)
	at io.micronaut.context.AbstractBeanResolutionContext.getBean(AbstractBeanResolutionContext.java:89)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2165)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at io.micronaut.http.client.netty.$DefaultNettyHttpClientRegistry$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1750)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1732)
	at io.micronaut.http.client.netty.$DefaultNettyHttpClientRegistry$HttpClient0$Definition.doInstantiate(Unknown Source)
	at io.micronaut.context.AbstractInitializableBeanDefinition.instantiate(AbstractInitializableBeanDefinition.java:774)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2328)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:1089)
	at io.micronaut.context.DefaultBeanContext.createBean(DefaultBeanContext.java:1069)
	at io.micronaut.context.BeanContext.createBean(BeanContext.java:157)
	at io.micronaut.gcp.credentials.DefaultOAuth2HttpTransportFactory.<init>(DefaultOAuth2HttpTransportFactory.java:71)
	at io.micronaut.gcp.credentials.$DefaultOAuth2HttpTransportFactory$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.findBean(DefaultBeanContext.java:1813)
	at io.micronaut.context.AbstractBeanResolutionContext.findBean(AbstractBeanResolutionContext.java:112)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2163)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at io.micronaut.gcp.credentials.$GoogleCredentialsFactory$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1750)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1732)
	at io.micronaut.gcp.credentials.$GoogleCredentialsFactory$DefaultGoogleCredentials0$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1750)
	at io.micronaut.context.AbstractBeanResolutionContext.getBean(AbstractBeanResolutionContext.java:89)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2165)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at io.micronaut.gcp.tracing.zipkin.$StackdriverSenderFactory$StackdriverSender1$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1750)
	at io.micronaut.context.AbstractBeanResolutionContext.getBean(AbstractBeanResolutionContext.java:89)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2165)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at io.micronaut.tracing.brave.$AsyncReporterConfiguration$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1750)
	at io.micronaut.context.AbstractBeanResolutionContext.getBean(AbstractBeanResolutionContext.java:89)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2165)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at io.micronaut.gcp.tracing.zipkin.$StackdriverSenderFactory$StackdriverReporter4$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.findBean(DefaultBeanContext.java:1813)
	at io.micronaut.context.AbstractBeanResolutionContext.findBean(AbstractBeanResolutionContext.java:112)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2163)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at io.micronaut.tracing.brave.$BraveTracerFactory$BraveTracing0$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1750)
	at io.micronaut.context.AbstractBeanResolutionContext.getBean(AbstractBeanResolutionContext.java:89)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2165)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at io.micronaut.tracing.brave.http.$HttpTracingFactory$HttpTracing0$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1750)
	at io.micronaut.context.AbstractBeanResolutionContext.getBean(AbstractBeanResolutionContext.java:89)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2165)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at io.micronaut.tracing.brave.http.$HttpTracingFactory$HttpClientHandler1$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1750)
	at io.micronaut.context.AbstractBeanResolutionContext.getBean(AbstractBeanResolutionContext.java:89)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2165)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at io.micronaut.tracing.brave.http.$BraveTracingClientFilter$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2951)
	at io.micronaut.context.DefaultBeanContext.addCandidateToList(DefaultBeanContext.java:3566)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistrations(DefaultBeanContext.java:3514)
	at io.micronaut.context.DefaultBeanContext.getBeanRegistrations(DefaultBeanContext.java:3484)
	at io.micronaut.context.DefaultBeanContext.getBeansOfType(DefaultBeanContext.java:1451)
	at io.micronaut.context.AbstractBeanResolutionContext.getBeansOfType(AbstractBeanResolutionContext.java:95)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBeansOfType(AbstractInitializableBeanDefinition.java:2253)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeansOfTypeForConstructorArgument(AbstractInitializableBeanDefinition.java:1476)
	at io.micronaut.http.client.filter.$DefaultHttpClientFilterResolver$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1750)
	at io.micronaut.context.AbstractBeanResolutionContext.getBean(AbstractBeanResolutionContext.java:89)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2165)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at io.micronaut.http.client.netty.$DefaultNettyHttpClientRegistry$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1750)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1732)
	at io.micronaut.http.client.netty.$DefaultNettyHttpClientRegistry$HttpClient0$Definition.doInstantiate(Unknown Source)
	at io.micronaut.context.AbstractInitializableBeanDefinition.instantiate(AbstractInitializableBeanDefinition.java:774)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2328)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:1089)
	at io.micronaut.context.DefaultBeanContext.createBean(DefaultBeanContext.java:1069)
	at io.micronaut.context.BeanContext.createBean(BeanContext.java:157)
	at io.micronaut.gcp.credentials.DefaultOAuth2HttpTransportFactory.<init>(DefaultOAuth2HttpTransportFactory.java:71)
	at io.micronaut.gcp.credentials.$DefaultOAuth2HttpTransportFactory$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.findBean(DefaultBeanContext.java:1813)
	at io.micronaut.context.AbstractBeanResolutionContext.findBean(AbstractBeanResolutionContext.java:112)
	at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2163)
	at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
	at io.micronaut.gcp.credentials.$GoogleCredentialsFactory$Definition.instantiate(Unknown Source)
	at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2330)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2300)
	at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2312)
	at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3114)
	at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
	at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3016)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2977)
	at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2751)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1750)
	at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1732)
	at io.micronaut.gcp.credentials.$GoogleCredentialsFactory$DefaultGoogleCredentials0$Definition.instantiate(Unknown Source)

Removed a lot of the stack trace for brevity.

Is it possible it's related to: #1014 ?

Steps To Reproduce

Run a Micronaut 4.3.2 and Micronaut GCP 5.4.0 application with Google Stackdriver tracing enabled.

Environment Information

GCP Cloud Run

Example Application

No response

Version

4.3.1

@vinay-sethi
Copy link

we encountered the same issue. can't update to micronaut 4.3

@jjathman
Copy link
Contributor Author

@jeremyg484 Wondering if you think this issue could be related at all to the changes with the auth interceptor work you did?

@jeremyg484 jeremyg484 self-assigned this Feb 13, 2024
@jeremyg484
Copy link
Contributor

@jeremyg484 Wondering if you think this issue could be related at all to the changes with the auth interceptor work you did?

Based on the stack trace, I'm guessing Stackdriver is somehow incompatible with #1015 which was the follow-on to #1014, but this is a bit puzzling.

You've tested without Stackdriver and this doesn't happen?

With Stackdriver enabled, can you try setting gcp.credentials.use-http-client=false and see if that gets you past the error?

@jjathman
Copy link
Contributor Author

@jeremyg484

You've tested without Stackdriver and this doesn't happen?

Correct, disabling tracing.zipkin.enabled=false fixes the error.

With Stackdriver enabled, can you try setting gcp.credentials.use-http-client=false and see if that gets you past the error?

Can confirm that this also gets passed the error.

Happy to do more troubleshooting but I'm a bit at a loss as to what exactly is taking place.

@jeremyg484
Copy link
Contributor

Happy to do more troubleshooting but I'm a bit at a loss as to what exactly is taking place.

Thanks for confirming. I'll see if I can reproduce it in a local test.

Using gcp.credentials.use-http-client=false shouldn't cause any issues - it basically falls back to the same behavior of the library prior to my attempts to improve the authentication logging, which is to say it will use the GCP library's internal HTTP client to retrieve auth tokens. Hopefully that allows you to go ahead and upgrade, but I will try to get a fix done soon so that it's not needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info: workaround available A workaround is available for the issue type: bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants