Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can not find io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider

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?

like image 854
Joe Avatar asked Oct 23 '25 19:10

Joe


1 Answers

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>
like image 174
Arundev Avatar answered Oct 27 '25 00:10

Arundev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!