Skip to main content

NTLM Authentication Failure

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
Bruce_Guan
Offline
Joined: 2011-08-21

Hi guys,

I encountered an authentication error while visiting an item which should be authenticted by NTLM protocal as first through HttpURLConnection.

I used Authenticator.setDefault() to set the default authenction infos.

The error is "java.io.IOException: Authentication failure".

java.io.IOException: Internal authentication error
at sun.net.www.protocol.http.NTLMAuthSequence.getAuthHeader(NTLMAuthSequence.java:36)
at sun.net.www.protocol.http.NTLMAuthentication.setHeaders(NTLMAuthentication.java:137)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)

I used ethereal to capture the request and response packages and found that the JDK hadn't sent the type3 message(include username, domain name, host name, etc) to the server.

The JDK version is 1.6.0_05.

Do anyone know why JDK hadn't sent the type3 message, please help me.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dgodbey
Offline
Joined: 2006-10-27

Have you found your way through this? I am also interested in connecting to an Exchange server that has recently been converted to NTLM authentication.