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

fix: graal error for private @Property #8541

Merged
merged 2 commits into from Dec 26, 2022
Merged

fix: graal error for private @Property #8541

merged 2 commits into from Dec 26, 2022

Commits on Dec 26, 2022

  1. Configuration menu
    Copy the full SHA
    bea91de View commit details
    Browse the repository at this point in the history
  2. fix: graal error for private @Property

    Whiel deploying a GraalVM native executable of a lambda function with 22.3 and MN 3.8.0 I was getting:
    ```
    Caused by: java.lang.NoSuchFieldError: No field 'logbackXmlLocation' found for type: io.micronaut.logging.impl.LogbackLoggingSystem
    at io.micronaut.core.reflect.ReflectionUtils.lambda$getRequiredField$2(ReflectionUtils.java:294)
    at java.util.Optional.orElseThrow(Optional.java:408)
    at io.micronaut.core.reflect.ReflectionUtils.getRequiredField(ReflectionUtils.java:294)
    at io.micronaut.context.AbstractInitializableBeanDefinition.setFieldWithReflection(AbstractInitializableBeanDefinition.java:979)
    io.micronaut.context.exceptions.BeanInstantiationException: Bean definition [io.micronaut.logging.impl.LogbackLoggingSystem] could not be loaded: Error instantiating bean of type  [io.micronaut.logging.impl.LogbackLoggingSystem]
    
    Caused by: io.micronaut.context.exceptions.DependencyInjectionException: Error instantiating bean of type  [io.micronaut.logging.impl.LogbackLoggingSystem]
    Message: Error setting field value: No field 'logbackXmlLocation' found for type: io.micronaut.logging.impl.LogbackLoggingSystem
    Path Taken: new LogbackLoggingSystem()
    at io.micronaut.context.AbstractInitializableBeanDefinition.setFieldWithReflection(AbstractInitializableBeanDefinition.java:986)
    at io.micronaut.logging.impl.$LogbackLoggingSystem$Definition.injectBean(Unknown Source)
    ```
    
    This PR changes LogbackLoggingSystem to use constructor injection for the property `logger.config` to avoid such an error.
    sdelamo committed Dec 26, 2022
    Configuration menu
    Copy the full SHA
    5ace18c View commit details
    Browse the repository at this point in the history