-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 building problem using 2.0.0.CR2 version #17552
Comments
Building successfully with 1.13.6.Final. |
cc @zakkak |
TLDR: Please remove This is similar to #6327. The reason the example is not working any more is the deletion of |
I removed
|
In |
The code of InternetProtocolFamily hasn't been changed since 4.1.60 https://github.com/netty/netty/blob/d34212439068091bcec29a8fad4df82f0a82c638/transport/src/main/java/io/netty/channel/socket/InternetProtocolFamily.java |
Quarkus 1.13.6.Final is using Netty 4.1.49.Final not 4.1.60.Final, that's why the provided reproducer is working in 1.13.6.Final. |
InternetProtocolFamily has |
In your code you are not substituting the method |
Sorry, my mistake. I fixed that, but now I'm getting this error:
Seems quarkus 2.0.0 has own NetUtil substitution. I would like to keep backward compatibility with previous versions. Do you know how to handle that? Updated project: |
You can use a conditional substitution, something like so: @TargetClass(value=NetUtil.class, onlyIf=Quarkus1Condition.class)
final class NetUtilSubstitutions {
....
static class Quarkus1Condition implements BooleanSupplier {
@Override
public boolean getAsBoolean() {
return Quarkus.class.getPackage().getImplementationVersion().startsWith("1.");
}
}
} the version check I am doing here is likely not bulletproof, but it should be good enough |
Thanks for the tip! |
Describe the bug
Getting error below during native-image building.
(Describe the problem clearly and concisely.)
Expected behavior
Native-image built successfully.
Actual behavior
Unable to build native-image.
To Reproduce
Run attached project.
quarkus-redisson-client.zip
mvn clean integration-test -Dnative=true
Environment (please complete the following information):
Output of
uname -a
orver
Linux 3bc459ae2770 4.9.93-linuxkit-aufs #1 SMP Wed Jun 6 16:55:56 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment GraalVM CE 21.1.0 (build 11.0.11+8-jvmci-21.1-b05)
OpenJDK 64-Bit Server VM GraalVM CE 21.1.0 (build 11.0.11+8-jvmci-21.1-b05, mixed mode, sharing)
Quarkus version or git rev
2.0.0.CR2
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 11.0.11, vendor: GraalVM Community, runtime: /opt/graalvm-ce-java11-21.1.0
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "4.9.93-linuxkit-aufs", arch: "amd64", family: "unix"
The text was updated successfully, but these errors were encountered: