Connection error with spigot & Kotlin

I have connection error. This is my code.
I’m using mongodb-driver-sync:4.0.5

class Main: JavaPlugin() {
    override fun onEnable() {
        logger.info("Hello World!")

        val connectionString = ConnectionString("mongodb+srv://<user>:<password>@cluster0.aapbl4p.mongodb.net/?retryWrites=true&w=majority")
        val mongoClient = MongoClients.create(connectionString)
        val database = mongoClient.getDatabase("sample_weatherdata")
        val col = database.getCollection("data")
        val data = col.find().first()
        logger.info(data!!.getString("callLetters"))
    }
}

Error log

java.io.UncheckedIOException: java.net.SocketException: Invalid argument
	at sun.nio.ch.DatagramSocketAdaptor.disconnect(DatagramSocketAdaptor.java:136) ~[?:?]
	at java.net.DatagramSocket.disconnect(DatagramSocket.java:393) ~[?:?]
	at com.sun.jndi.dns.DnsClient.doUdpQuery(DnsClient.java:437) ~[jdk.naming.dns:?]
	at com.sun.jndi.dns.DnsClient.query(DnsClient.java:214) ~[jdk.naming.dns:?]
	at com.sun.jndi.dns.Resolver.query(Resolver.java:81) ~[jdk.naming.dns:?]
	at com.sun.jndi.dns.DnsContext.c_getAttributes(DnsContext.java:434) ~[jdk.naming.dns:?]
	at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:235) ~[?:?]
	at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:141) ~[?:?]
	at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:129) ~[?:?]
	at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:171) ~[?:?]
	at com.mongodb.internal.dns.DefaultDnsResolver.resolveAdditionalQueryParametersFromTxtRecords(DefaultDnsResolver.java:114) ~[?:?]
	at com.mongodb.ConnectionString.<init>(ConnectionString.java:378) ~[?:?]
	at rpg.oracle.EconomySystem.Main.onEnable(Main.kt:30) ~[?:?]
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]
	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]
	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]
	at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:492) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]
	at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:406) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]
	at org.bukkit.craftbukkit.v1_16_R3.CraftServer.reload(CraftServer.java:879) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]
	at org.bukkit.Bukkit.reload(Bukkit.java:651) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]
	at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:27) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]
	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]
	at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchCommand(CraftServer.java:761) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]
	at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchServerCommand(CraftServer.java:746) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]
	at net.minecraft.server.v1_16_R3.DedicatedServer.handleCommandQueue(DedicatedServer.java:426) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]
	at net.minecraft.server.v1_16_R3.DedicatedServer.b(DedicatedServer.java:395) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]
	at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1127) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]
	at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:966) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]
	at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:273) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]
	at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.net.SocketException: Invalid argument
	at sun.nio.ch.DatagramChannelImpl.disconnect0(Native Method) ~[?:?]
	at sun.nio.ch.DatagramChannelImpl.disconnect(DatagramChannelImpl.java:1294) ~[?:?]
	at sun.nio.ch.DatagramSocketAdaptor.disconnect(DatagramSocketAdaptor.java:134) ~[?:?]
	... 29 more

pls Help me