Reputation: 693
I am coding with Vertx, when I run Junit test under my laptop (MacOs), all unit tests failed, in fact, when these unit tests are run successfully under Linux.
This is my Java 11 version:
java version "11.0.12" 2021-07-20
IBM Semeru Runtime Certified Edition 11.0.12.0 (build 11.0.12+7)
Eclipse OpenJ9 VM 11.0.12.0 (build openj9-0.27.0, JRE 11 Mac OS X amd64-64-Bit Compressed References 20210901_134 (JIT enabled, AOT enabled)
OpenJ9 - 1851b0074
OMR - 9db1c870d
JCL - 54d2067eec based on jdk-11.0.12+7)
I am using gradle 7.2 as well
When I ran ./gradlew clean build, then unit test are executed, then I saw the following error. It seem vertx call netty, then netty library get error that complain MacOS.
Can not find io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider in the classpath, fallback to system defaults. This may result in incorrect DNS resolutions on MacOS.
BTW, this is our Vertx version
implementation group: 'io.vertx', name: 'vertx-core', version: '4.0.3'
Any ideas for that? how to fix it?
Upvotes: 3
Views: 16102
Reputation: 1
Add below in POM:
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.1.109.Final</version>
</dependency>
Upvotes: 0
Reputation: 1944
Please add below dependency to pom. Still this is not a fix, its just a work around.
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
</dependency>
Upvotes: 4
Reputation: 556
From this and this reported identical/similar issues, you may want to consider adding these in your gradle configs
runtimeOnly("io.netty:netty-resolver-dns-native-macos:XXX:osx-x86_64")
where XXX is version of netty-resolver-dns-native-macos
or
io.netty:netty-all:4.1.68.Final.
Upvotes: 4