You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example that reproduces the problem uploaded to Github
Full description of the issue provided (see below)
Steps to Reproduce
Create a Micronaut Application with Eureka and OAuth2 support
Update config to support OpenID Connect
Try to start application
Expected Behaviour
Application should start
Actual Behaviour
Application fails to start with a StackOverflowError occurring during bean instantiation. The specific errors encountered change from run to run, but the stack overflow is always present:
Caused by: java.lang.StackOverflowError: null
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at io.micronaut.context.exceptions.BeanInstantiationException.<init>(BeanInstantiationException.java:49)
at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:1970)
...
The application will start (even without a Eureka server running) if you do any one of the following:
1 - Set micronaut.security.oauth2.enabled to false
2 - Remove the confugration at micronaut.security.oauth2.clients.default.openid
3 - Remove io.micronaut.security:micronaut-security-jwt from build.gradle
4 - Remove the eureka configuration
The text was updated successfully, but these errors were encountered:
@JasonTypesCodes@sdelamo The issue appears to be DefaultTokenEndpointClient unsafely creating beans in the constructor. This is an issue because the bean HttpClientConfiguration is extended by EurekaClientConfiguration which injects components related to the http client so when createBean is called these are currently being in the middle of being created but not registered with the context yet.
Task List
Steps to Reproduce
Expected Behaviour
Application should start
Actual Behaviour
Application fails to start with a StackOverflowError occurring during bean instantiation. The specific errors encountered change from run to run, but the stack overflow is always present:
Environment Information
Example Application
https://github.com/JasonTypesCodes/mn-eureka-oauth
To find the error:
The application will start (even without a Eureka server running) if you do any one of the following:
1 - Set
micronaut.security.oauth2.enabled
tofalse
2 - Remove the confugration at
micronaut.security.oauth2.clients.default.openid
3 - Remove
io.micronaut.security:micronaut-security-jwt
frombuild.gradle
4 - Remove the
eureka
configurationThe text was updated successfully, but these errors were encountered: