corretto-11
corretto-11 copied to clipboard
Could not initialize class java.net.DualStackPlainDatagramSocketImpl. Windows 10. Corretto 11.0.7
OS: Windows 10 JDK Version: openjdk version "11.0.7" 2020-04-14 LTS OpenJDK Runtime Environment Corretto-11.0.7.10.1 (build 11.0.7+10-LTS) OpenJDK 64-Bit Server VM Corretto-11.0.7.10.1 (build 11.0.7+10-LTS, mixed mode)
Issue:
When trying to initialize the connection to SQL Server using Windows Authentication it fails with exception:
Caused by: java.lang.ExceptionInInitializerError
at java.base/java.net.DefaultDatagramSocketImplFactory.createDatagramSocketImpl(DefaultDatagramSocketImplFactory.java:101)
at java.base/java.net.DatagramSocket.createImpl(DatagramSocket.java:333)
at java.base/java.net.DatagramSocket.
Diving deeper I can see that it happens because of: Could not initialize class java.net.DualStackPlainDatagramSocketImpl
Steps to Reproduce: Tried with JDBC Drivers: mssql-jdbc-8.2.2.jre11 or sqljdbc4 Create a simple JDBC connection to SQL Server and add sqljdbc_auth.dll to allow to use of Windows Authentication. Then try to connect to SQL Server using Windows Authentication.
Note: This BUG is not reproducible for Amazon Corretto 11.0.6 and OpenJDK 11