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

Invalid reflect-config.json file in opentelemetry-api 1.3.0 #6147

Closed
cw-alexcroteau opened this issue Jan 12, 2024 · 1 comment
Closed

Invalid reflect-config.json file in opentelemetry-api 1.3.0 #6147

cw-alexcroteau opened this issue Jan 12, 2024 · 1 comment
Labels
Bug Something isn't working

Comments

@cw-alexcroteau
Copy link

Describe the bug
When compiling a spring-native app with io.opentelemetry:opentelemetry-bom:1.34.0, an invalid reflect-config.json gives the following error:

[1/8] Initializing...                                                                                    (0.0s @ 0.27GB)
Error: Error parsing reflection configuration in jar:file:[REDACTED]/opentelemetry-api-1.34.0.jar!/META-INF/native-image/io.opentelemetry/opentelemetry-api/reflect-config.json:
first level of document must be an array of class descriptors
Verify that the configuration matches the schema described in the -H:PrintFlags=+ output for option ReflectionConfigurationResources.
Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception

Steps to reproduce
Create a build.gradle.kts file with "io.opentelemetry:opentelemetry-bom:1.33.0". The app builds. Update the BOM version to 1.34.0, the app doesn't build and gives the error above.

build.gradle.kts file very similar to https://github.com/open-telemetry/opentelemetry-java-examples/blob/bd161f234bac149020b0ede521d83f9ae5f0203d/spring-native/build.gradle.kts#L14

What did you expect to see?
No reflect-config.json or a valid one in the JAR

What did you see instead?
The invalid reflect-config.json file is:

{
  "resources": {
    "includes": [
      {
        "pattern":"\\Qio/opentelemetry/api/version.properties\\E"
      }
    ]
  },
  "bundles": []
}

What version and what artifacts are you using?
Artifacts: opentelemetry-api
Version: 1.34.0
How did you reference these artifacts?

  implementation(platform("io.opentelemetry:opentelemetry-bom:1.34.0"))
  implementation(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.32.0-alpha"))
  implementation("io.opentelemetry.instrumentation:opentelemetry-spring-boot-starter")

Environment
Compiler:

java 17.0.8 2023-07-18 LTS
Java(TM) SE Runtime Environment Oracle GraalVM 17.0.8+9.1 (build 17.0.8+9-LTS-jvmci-23.0-b14)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 17.0.8+9.1 (build 17.0.8+9-LTS-jvmci-23.0-b14, mixed mode, sharing)

OS: "Ubuntu 20.04"
Runtime: Same as above
Runtime OS: Same as above

@cw-alexcroteau cw-alexcroteau added the Bug Something isn't working label Jan 12, 2024
@jack-berg
Copy link
Member

Sorry about that! This was resolved in #6134 and published in a patch release 1.34.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants