title: jcifs.smb.SmbException: A duplicate name exists on the network
body: <p>I am getting below Exception while using Spring Security NTLM (2.0.4).</p>
  
  <p>We are using Domain Controller.</p>
  
  <p>This Domain controller is designed to resolve multiple IP address in order to provide load balancing.</p>
  
  <p>Is there any way to handle this using Spring NTLM.</p>
  
  <pre><code>jcifs.smb.SmbException: A duplicate name exists on the network.
  at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:522)
  at jcifs.smb.SmbTransport.send(SmbTransport.java:622)
  at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:280)
  at jcifs.smb.SmbSession.send(SmbSession.java:233)
  at jcifs.smb.SmbTree.treeConnect(SmbTree.java:154)
  at jcifs.smb.SmbSession.logon(SmbSession.java:169)
  at jcifs.smb.SmbSession.logon(SmbSession.java:162)
  at org.springframework.security.ui.ntlm.NtlmProcessingFilter.logon(NtlmProcessingFilter.java:410)
  at org.springframework.security.ui.ntlm.NtlmProcessingFilter.doFilterHttp(NtlmProcessingFilter.java:339)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
  at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
  at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
  at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
  at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
  </code></pre>
  
  <p>While searching for solution, we came across some suggestions that we need to modify NTLMProcessingFilter class.</p>
  
  <p>JAR: spring-security-ntlm-2.0.4.jar.
  Class: NtlmProcessingFilter.java
  Method: getDCAddress()
  Code changes:
  Existing:      dc = UniAddress. getByName (domainController, true);</p>
  
  <p>Modified : UniAddress dc = UniAddress.getByName( domainController, true );
                dc = UniAddress.getByName( dc.getHostAddress(), true );</p>
  
  <p>But we dont have choice to modify the JAR code.
  can anyone please suggest the solution.</p>
  
  <p>Thanks in Advance.</p>
  
  <p>Srini</p>