[jcifs] How to extend lifetime of NtlmPasswordAuthentication-Object

Michael B Allen mba2000 at ioplex.com
Tue Apr 25 21:46:27 GMT 2006

On Tue, 25 Apr 2006 20:09:29 +0000 (UTC)
Andreas Knoor <knoor at e-spirit.de> wrote:

> Hello,
> we have some problems with the lifetime of NtlmPasswordAuthentication objects,
> that are created by using NTLM.
> When the lifetime is expired, every JCIF operation throws an SmbAuthException
> with status code NT_STATUS_ACCESS_VIOLATION. 
> The question is: What factors are responsible for the lifetime of the
> NtlmPasswordAuthentication objects? 
> How can i increase the lifetime of the NtlmPasswordAuthentication objects? 
> In our case, the lifetime is less than 20 seconds for some fileservers, that are
> connected over a WAN network.

I don't know anything about NPA "lifetime" but I suspect what you're
seeing is some kind of servlet session timeout, session serialization,
some artifact of a cluster environment or NPA invalidation due to the
server closing the connection. Look at the code. That exception only
occurs when the server challenge of the NPA is no longer valid for the
target. You guys have been around long enough that you should understand
the server challange thing very well by now. And as always I direct you
to look at the NetworkExplorer servlet [1].


[1] Although arguably the NetworkExplorer doesn't handle this as well
as it could. It should just trigger renegotiation. I don't know why it
tries to send a redirect. That's clumsey. But the catch is there.

More information about the jcifs mailing list