[jcifs] Exception: Invalid access to memory location

Michael B Allen mba2000 at ioplex.com
Thu May 12 18:10:22 GMT 2005

Richard Caper said:
> I think this happens if the challenge and response does not match.
> Are you using the NtlmPasswordAuthentication object to access a file
> on the same server that is acting as the filter domain controller?
> With the filter the password is not available so I think you can only
> access files on the server giving out the challenge.
> On 5/12/05, Maher Martin <MMaher at webasto.de> wrote:
>> I'm playing around with Ntlm Authentication & SmbFile and I'm getting an
>> "Invalid access to memory location" exception when invoking the
>> "smbFile.exists()" method when trying to access a file on an NTFS
>> server.


You can only use an NtlmPasswordAuthentication object with the server
against which you have authenticated. IOW you cannot use the
NtlmHttpFilter to get an NPA and then use that NPA to build an SmbFile
referencing a resource on an arbirary server. You would only be able to
access files on the domain controller (which very likely isn't what you

For examples of how to use NTLM HTTP Authentication with an aribirary
server so that you can access files on it transparently through a web
browser see the jcifs/http/NetworkExplorer.java servlet and Davenport.


More information about the jcifs mailing list