Getting Can not find io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider in the classpath, fallback to system defaults. Whne using WebClient.

3,398 views
Skip to first unread message

javadevmtl

unread,
Mar 22, 2021, 3:30:32 PM3/22/21
to vert.x
Hi using Vertx gradle plugin with Java 11 and Vertx 4.0.3

I'm trying to write some sample code and getting:

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.

public void doSomething(RoutingContext rc) {
WebClient client = WebClient.create(vertx);

client
.post("foo.bar", "/foo/bar.json")
.ssl(true)
.as(BodyCodec.jsonObject())
.sendJsonObject(new JsonObject()
.put("first_name", "John")
.put("last_name", "Smith")
.put("phone", "15555555555")
.put("verified_email", true)
)
.onComplete(result -> {
if(result.succeeded())
rc.response().end(result.result().bodyAsBuffer());
else
rc.fail(result.cause());
});
}

Thomas SEGISMONT

unread,
Mar 23, 2021, 5:45:04 AM3/23/21
to vert.x

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/30a95683-4bc0-461c-a191-64f272c176e4n%40googlegroups.com.

javadevmtl

unread,
Mar 23, 2021, 9:56:45 AM3/23/21
to vert.x
Why so? I guess dependencies changed for Netty and Vertx 4.x? Also I assume if I leave the resolver in the dependencies. If i build for docker and run it in alpine or something it won't matter because Netty will figure out to use the Linux one right? So we don't need to do anything fancy conditional regarding Os in our build scripts?

Julien Viet

unread,
Mar 23, 2021, 11:58:55 AM3/23/21
to vert.x
Actually this was also happening before this update but was not logged.

We need to update the documentation I think about this.

Reply all
Reply to author
Forward
0 new messages