-
Notifications
You must be signed in to change notification settings - Fork 27
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
Native image build fails with Micronaut 4.2.1 #464
Comments
Hi, I'm not sure that this behaviour is micronaut-tracing related. I experience the same with Micronaut 4.2.1 w/o any dependency to micronaut-tracing. My guess is that this must be something general in combination with Kotlin. When adding `` I get this additional output:
my FROM ghcr.io/graalvm/native-image-community:17-ol9 AS graalvm
WORKDIR /home/app
COPY layers/libs /home/app/libs
COPY layers/classes /home/app/classes
COPY layers/resources /home/app/resources
COPY layers/application.jar /home/app/application.jar
RUN mkdir /home/app/config-dirs
RUN mkdir -p /home/app/config-dirs/generateResourcesConfigFile
RUN mkdir -p /home/app/config-dirs/io.netty/netty-common/4.1.80.Final
RUN mkdir -p /home/app/config-dirs/org.jetbrains.kotlin/kotlin-stdlib/1.7.10
RUN mkdir -p /home/app/config-dirs/org.jetbrains.kotlin/kotlin-reflect/1.7.10
RUN mkdir -p /home/app/config-dirs/ch.qos.logback/logback-classic/1.4.1
COPY config-dirs/generateResourcesConfigFile /home/app/config-dirs/generateResourcesConfigFile
COPY config-dirs/io.netty/netty-common/4.1.80.Final /home/app/config-dirs/io.netty/netty-common/4.1.80.Final
COPY config-dirs/org.jetbrains.kotlin/kotlin-stdlib/1.7.10 /home/app/config-dirs/org.jetbrains.kotlin/kotlin-stdlib/1.7.10
COPY config-dirs/org.jetbrains.kotlin/kotlin-reflect/1.7.10 /home/app/config-dirs/org.jetbrains.kotlin/kotlin-reflect/1.7.10
COPY config-dirs/ch.qos.logback/logback-classic/1.4.1 /home/app/config-dirs/ch.qos.logback/logback-classic/1.4.1
RUN native-image --trace-class-initialization=kotlin.coroutines.intrinsics.CoroutineSingletons --exclude-config .*/libs/netty-transport-4.1.101.Final.jar ^/META-INF/native-image/.* --exclude-config .*/libs/netty-buffer-4.1.101.Final.jar ^/META-INF/native-image/.* --exclude-config .*/libs/netty-codec-http-4.1.101.Final.jar ^/META-INF/native-image/.* --exclude-config .*/libs/netty-handler-4.1.101.Final.jar ^/META-INF/native-image/.* --exclude-config .*/libs/netty-common-4.1.101.Final.jar ^/META-INF/native-image/.* --exclude-config .*/libs/netty-codec-http2-4.1.101.Final.jar ^/META-INF/native-image/.* -cp /home/app/libs/*.jar:/home/app/resources:/home/app/application.jar --no-fallback -o application -H:ConfigurationFileDirectories=/home/app/config-dirs/generateResourcesConfigFile,/home/app/config-dirs/io.netty/netty-buffer/4.1.80.Final,/home/app/config-dirs/io.netty/netty-common/4.1.80.Final,/home/app/config-dirs/io.netty/netty-codec-http/4.1.80.Final,/home/app/config-dirs/io.netty/netty-transport/4.1.80.Final,/home/app/config-dirs/io.netty/netty-handler/4.1.80.Final,/home/app/config-dirs/io.netty/netty-codec-http2/4.1.80.Final,/home/app/config-dirs/org.jetbrains.kotlin/kotlin-stdlib/1.7.10,/home/app/config-dirs/org.jetbrains.kotlin/kotlin-reflect/1.7.10,/home/app/config-dirs/ch.qos.logback/logback-classic/1.4.1 ch.onstructive.gpr.Application
FROM ubuntu:23.10
EXPOSE 8080
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
HEALTHCHECK CMD curl -s localhost:8080/endpoints/health | grep '"status":"UP"'
RUN groupadd app && useradd -rm -d /home/app -s /bin/bash -g app -u 1001 app
USER app
COPY --from=graalvm /home/app/application /app/application
ENTRYPOINT ["/app/application"]
|
something broke / changed in Kotlin 1.9, downgrading to 1.8 will fix it |
It compiles fine if I remove |
it effects it because this exporter uses okhttp which moved from Java to Kotlin and now requires Kotlin standard lib which is what is broken it seems |
Expected Behavior
Building native-image of Micronaut 4.2.1 with tracing-opentelemetry-jaeger dependency succeeds.
Actual Behaviour
Builds fails with:
Works with Micronaut 4.1.6, discussed on Discord "Micronaut Framework 4.2.0 updates to Kotlin 1.9.2 so it appears something broke."
https://discord.com/channels/1121511613250412714/1182711987310960670
Steps To Reproduce
/mvnw -Dpackaging=native-image package -P graalvm
Environment Information
OS: Ubuntu
Java version: 17.0.7+8-LTS, vendor version: Oracle GraalVM 17.0.7+8.1
Example Application
Here is the sample project https://github.com/msixta/native-image
Version
4.2.1
The text was updated successfully, but these errors were encountered: