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

io.micrometer.tracing.Tracer on the classpath breaks AOT processing for tests #33298

Closed
mhalbritter opened this issue Nov 22, 2022 · 0 comments
Closed
Assignees
Labels
theme: observability Issues related to observability type: bug A general bug
Milestone

Comments

@mhalbritter
Copy link
Contributor

mhalbritter commented Nov 22, 2022

Adding this dependency

implementation 'io.micrometer:micrometer-tracing-bridge-brave'

with SB 3.0.0-SNAPSHOT is enough to let the processTestAot task fail:

2022-11-22T13:25:01.952+01:00  WARN 56719 --- [           main] o.s.t.c.aot.TestContextAotGenerator      : Failed to generate AOT artifacts for test classes [com.example.demo.DemoApplicationTests]

org.springframework.test.context.aot.TestContextAotException: Failed to process test class [com.example.demo.DemoApplicationTests] for AOT
        at org.springframework.test.context.aot.TestContextAotGenerator.processAheadOfTime(TestContextAotGenerator.java:239) ~[spring-test-6.0.0.jar:6.0.0]
        at org.springframework.test.context.aot.TestContextAotGenerator.lambda$processAheadOfTime$4(TestContextAotGenerator.java:205) ~[spring-test-6.0.0.jar:6.0.0]
        at java.base/java.util.Map.forEach(Map.java:713) ~[na:na]
        at org.springframework.test.context.aot.TestContextAotGenerator.processAheadOfTime(TestContextAotGenerator.java:197) ~[spring-test-6.0.0.jar:6.0.0]
        at org.springframework.test.context.aot.TestContextAotGenerator.processAheadOfTime(TestContextAotGenerator.java:159) ~[spring-test-6.0.0.jar:6.0.0]
        at org.springframework.test.context.aot.TestAotProcessor.performAotProcessing(TestAotProcessor.java:91) ~[spring-test-6.0.0.jar:6.0.0]
        at org.springframework.test.context.aot.TestAotProcessor.doProcess(TestAotProcessor.java:72) ~[spring-test-6.0.0.jar:6.0.0]
        at org.springframework.test.context.aot.TestAotProcessor.doProcess(TestAotProcessor.java:39) ~[spring-test-6.0.0.jar:6.0.0]
        at org.springframework.context.aot.AbstractAotProcessor.process(AbstractAotProcessor.java:82) ~[spring-context-6.0.0.jar:6.0.0]
        at org.springframework.boot.test.context.SpringBootTestAotProcessor.main(SpringBootTestAotProcessor.java:57) ~[spring-boot-test-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
Caused by: java.lang.IllegalStateException: No constructor or factory method candidate found for Root bean: class [io.micrometer.tracing.Tracer]; scope=singleton; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodNames=null; destroyMethodNames=null and argument types []
        at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorOrFactoryMethod(ConstructorResolver.java:939) ~[spring-beans-6.0.0.jar:6.0.0]
        at org.springframework.beans.factory.support.RegisteredBean.resolveConstructorOrFactoryMethod(RegisteredBean.java:197) ~[spring-beans-6.0.0.jar:6.0.0]
        at org.springframework.beans.factory.aot.BeanDefinitionMethodGenerator.<init>(BeanDefinitionMethodGenerator.java:79) ~[spring-beans-6.0.0.jar:6.0.0]
        at org.springframework.beans.factory.aot.BeanDefinitionMethodGeneratorFactory.getBeanDefinitionMethodGenerator(BeanDefinitionMethodGeneratorFactory.java:102) ~[spring-beans-6.0.0.jar:6.0.0]
        at org.springframework.beans.factory.aot.BeanDefinitionMethodGeneratorFactory.getBeanDefinitionMethodGenerator(BeanDefinitionMethodGeneratorFactory.java:118) ~[spring-beans-6.0.0.jar:6.0.0]
        at org.springframework.beans.factory.aot.BeanRegistrationsAotProcessor.processAheadOfTime(BeanRegistrationsAotProcessor.java:45) ~[spring-beans-6.0.0.jar:6.0.0]
        at org.springframework.beans.factory.aot.BeanRegistrationsAotProcessor.processAheadOfTime(BeanRegistrationsAotProcessor.java:35) ~[spring-beans-6.0.0.jar:6.0.0]
        at org.springframework.context.aot.BeanFactoryInitializationAotContributions.getContributions(BeanFactoryInitializationAotContributions.java:67) ~[spring-context-6.0.0.jar:6.0.0]
        at org.springframework.context.aot.BeanFactoryInitializationAotContributions.<init>(BeanFactoryInitializationAotContributions.java:49) ~[spring-context-6.0.0.jar:6.0.0]
        at org.springframework.context.aot.BeanFactoryInitializationAotContributions.<init>(BeanFactoryInitializationAotContributions.java:44) ~[spring-context-6.0.0.jar:6.0.0]
        at org.springframework.context.aot.ApplicationContextAotGenerator.lambda$processAheadOfTime$0(ApplicationContextAotGenerator.java:58) ~[spring-context-6.0.0.jar:6.0.0]
        at org.springframework.context.aot.ApplicationContextAotGenerator.withCglibClassHandler(ApplicationContextAotGenerator.java:67) ~[spring-context-6.0.0.jar:6.0.0]
        at org.springframework.context.aot.ApplicationContextAotGenerator.processAheadOfTime(ApplicationContextAotGenerator.java:53) ~[spring-context-6.0.0.jar:6.0.0]
        at org.springframework.test.context.aot.TestContextAotGenerator.processAheadOfTime(TestContextAotGenerator.java:235) ~[spring-test-6.0.0.jar:6.0.0]
        ... 9 common frames omitted

I think this is related to #32907

Interestingly this doesn't let the build fail.

@mhalbritter mhalbritter added type: bug A general bug theme: observability Issues related to observability labels Nov 22, 2022
@mhalbritter mhalbritter added this to the 3.0.0 milestone Nov 22, 2022
@mhalbritter mhalbritter self-assigned this Nov 22, 2022
ndwlocatieservices added a commit to ndwnu/nls-accessibility-map that referenced this issue Aug 19, 2024
…o v3

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [nu.ndw.nls.geometry:nls-geometry](https://spring.io/projects/spring-boot) ([source](https://github.com/spring-projects/spring-boot)) | compile | major | `2.2.0` -> `3.0.0` |

---

### Release Notes

<details>
<summary>spring-projects/spring-boot (nu.ndw.nls.geometry:nls-geometry)</summary>

### [`v3.0.0`](https://github.com/spring-projects/spring-boot/releases/tag/v3.0.0)

[Compare Source](spring-projects/spring-boot@v2.2.1.RELEASE...v3.0.0)

See the [Release notes for 3.0](https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Release-Notes) for upgrade instructions and details of new features.

#### ⭐ New Features

-   Provide a configuration property for the observation patterns of Spring Integration components [#&#8203;33099](spring-projects/spring-boot#33099)

#### 🐞 Bug Fixes

-   io.micrometer.tracing.Tracer on the classpath breaks AOT processing for tests [#&#8203;33298](spring-projects/spring-boot#33298)
-   Tracer library HTTP instrumentation is auto-configured unnecessarily [#&#8203;33287](spring-projects/spring-boot#33287)
-   Auto-configuration ignores user-provided ObservationConventions [#&#8203;33285](spring-projects/spring-boot#33285)
-   `ScheduledBeanLazyInitializationExcludeFilter` is auto-configured even when annotation-based scheduled has not been enabled [#&#8203;33284](spring-projects/spring-boot#33284)
-   SpringBootContextLoader prints banner twice when using a `@ContextHierarchy` [#&#8203;33263](spring-projects/spring-boot#33263)
-   Properties migrator causes an application to fail to start if it tries to map a property whose metadata data entry contains an invalid configuration property name [#&#8203;33250](spring-projects/spring-boot#33250)
-   Wavefront MeterRegistryCustomizer is not applying application tags from application.properties [#&#8203;33244](spring-projects/spring-boot#33244)
-   Actuator responses no longer format timestamps as ISO-8601 [#&#8203;33236](spring-projects/spring-boot#33236)
-   Configuration property is not bound in a native image when property has get, set, and is methods [#&#8203;33232](spring-projects/spring-boot#33232)
-   Configuration property binding does not deal with bridge methods [#&#8203;33212](spring-projects/spring-boot#33212)
-   Contribute missing resource hints for GraphQL schema files and GraphiQL HTML page [#&#8203;33208](spring-projects/spring-boot#33208)
-   Hints for ClientHttpRequestFactory should only be generated for matching methods  [#&#8203;33203](spring-projects/spring-boot#33203)
-...
ndwlocatieservices added a commit to ndwnu/nls-routing-map-matcher that referenced this issue Aug 21, 2024
…o v3

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [nu.ndw.nls.geometry:nls-geometry](https://spring.io/projects/spring-boot) ([source](https://github.com/spring-projects/spring-boot)) | compile | major | `2.1.4` -> `3.0.0` |

---

### Release Notes

<details>
<summary>spring-projects/spring-boot (nu.ndw.nls.geometry:nls-geometry)</summary>

### [`v3.0.0`](https://github.com/spring-projects/spring-boot/releases/tag/v3.0.0)

[Compare Source](spring-projects/spring-boot@v2.2.1.RELEASE...v3.0.0)

See the [Release notes for 3.0](https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Release-Notes) for upgrade instructions and details of new features.

#### ⭐ New Features

-   Provide a configuration property for the observation patterns of Spring Integration components [#&#8203;33099](spring-projects/spring-boot#33099)

#### 🐞 Bug Fixes

-   io.micrometer.tracing.Tracer on the classpath breaks AOT processing for tests [#&#8203;33298](spring-projects/spring-boot#33298)
-   Tracer library HTTP instrumentation is auto-configured unnecessarily [#&#8203;33287](spring-projects/spring-boot#33287)
-   Auto-configuration ignores user-provided ObservationConventions [#&#8203;33285](spring-projects/spring-boot#33285)
-   `ScheduledBeanLazyInitializationExcludeFilter` is auto-configured even when annotation-based scheduled has not been enabled [#&#8203;33284](spring-projects/spring-boot#33284)
-   SpringBootContextLoader prints banner twice when using a `@ContextHierarchy` [#&#8203;33263](spring-projects/spring-boot#33263)
-   Properties migrator causes an application to fail to start if it tries to map a property whose metadata data entry contains an invalid configuration property name [#&#8203;33250](spring-projects/spring-boot#33250)
-   Wavefront MeterRegistryCustomizer is not applying application tags from application.properties [#&#8203;33244](spring-projects/spring-boot#33244)
-   Actuator responses no longer format timestamps as ISO-8601 [#&#8203;33236](spring-projects/spring-boot#33236)
-   Configuration property is not bound in a native image when property has get, set, and is methods [#&#8203;33232](spring-projects/spring-boot#33232)
-   Configuration property binding does not deal with bridge methods [#&#8203;33212](spring-projects/spring-boot#33212)
-   Contribute missing resource hints for GraphQL schema files and GraphiQL HTML page [#&#8203;33208](spring-projects/spring-boot#33208)
-   Hints for ClientHttpRequestFactory should only be generated for matching methods  [#&#8203;33203](spring-projects/spring-boot#33203)
-...
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: observability Issues related to observability type: bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant