[jcifs] Jcifs, connect localhost without a network connection, SmbException: Connection refused:connect

Michael B Allen mba2000 at ioplex.com
Fri Nov 5 22:40:51 GMT 2004

On Fri, 5 Nov 2004 08:58:49 -0500
Julie_Zhu at dadebehring.com wrote:

> Mike,
> Thank you very much for your suggestion. I think we may need to deploy our
> application on a PC with a network connection.
> I have another problem here.
> When I use version 0.9.7 with the following web.xml configuration, it
> works fine.
>  <filter>
>             <filter-name>NtlmHttpFilter</filter-name>
>       <filter-class>jcifs.http.NtlmHttpFilter</filter-class>
>        <init-param>
>                     <param-name>jcifs.util.loglevel</param-name>
>                     <param-value>2</param-value>
>                 </init-param>
>    </filter>
>    <filter-mapping>
>             <filter-name>NtlmHttpFilter</filter-name>
>             <url-pattern>/*</url-pattern>
>    </filter-mapping>
> However, when I change to version 1.1, it returns with the following
> message:
> jcifs.smb.SmbException: A domain was not specified
>              jcifs.smb.SmbSession.getChallengeForDomain(SmbSession.java:7
>              8)
>              jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:123)
> According to your article on
> http://jcifs.samba.org/src/docs/ntlmhttpauth.html, it said:
> Either a jcifs.smb.client.domain or jcifs.smb.client.domainController
> property is required. This will be suitable to authenticate clients that
> are members of the specified domain as well as other domains with which it
> has trusts relationships.
> Do you have any idea why this happen?  Does version 1.1 really require to
> have a domain?


However, you could hack the filter to try the workstation domain from
the type-1-message. I've never tried that but in theory I think it might
work provided that domain is the authentication domain or has a trust
relationship with the user's domain, etc.


Greedo shoots first? Not in my Star Wars.

More information about the jcifs mailing list