[jcifs] How would I trouble shoot a java.net.UnknownHostException?

Todd Patrick Todd.Patrick at dtn.com
Mon Oct 30 15:25:40 GMT 2006


I am trying to set-up JCIFS NTLM HTTP Authentication according to the
instructions on http://jcifs.samba.org/src/docs/ntlmhttpauth.html.

The exception that I am returning is:

java.net.UnknownHostException: DTN.COM
	
jcifs.netbios.NameServiceClient.getAllByName(NameServiceClient.java:292)
	jcifs.netbios.NbtAddress.getAllByName(NbtAddress.java:454)
	jcifs.smb.SmbSession.getChallengeForDomain(SmbSession.java:95)
	jcifs.http.NtlmHttpFilter.negotiate(NtlmHttpFilter.java:150)
	jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:114)

I ran a ipconfig /all and the information I returned is (I've masked out
the values, but you should get the idea):

C:\>ipconfig /all

Windows IP Configuration

        Host Name . . . . . . . . . . . . : xxxxxxxxxx
        Primary Dns Suffix  . . . . . . . : dtn.com
        Node Type . . . . . . . . . . . . : xxxxxxxxxx
        IP Routing Enabled. . . . . . . . : No
        WINS Proxy Enabled. . . . . . . . : No
        DNS Suffix Search List. . . . . . : dtn.com


Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . : dtn.com
        Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Network
Connection
        Physical Address. . . . . . . . . : 0000000000000000
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        IP Address. . . . . . . . . . . . : 10.0.0.0
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 10.0.0.0
        DHCP Server . . . . . . . . . . . : 10.0.0.0
        DNS Servers . . . . . . . . . . . : 10.0.0.0
                                            10.0.0.1
        Primary WINS Server . . . . . . . : 10.0.0.0
        Secondary WINS Server . . . . . . : 10.0.0.0

I would had thought that the Primary Dns Suffix would be the value used
for jcifs.smb.client.domain in the following set-up:

<filter>
<filter-name>NtlmHttpFilter</filter-name>
<filter-class>jcifs.http.NtlmHttpFilter</filter-class>
<init-param>
    <param-name>jcifs.netbios.wins</param-name>
    <param-value>10.0.0.0,10.0.0.1</param-value>
</init-param>
<init-param>
    <param-name>jcifs.smb.client.domain</param-name>
    <param-value>dtn.com</param-value>
</init-param>
<init-param>
    <param-name>jcifs.smb.client.username</param-name>
    <param-value>xxxxxx</param-value>
</init-param>
<init-param>
    <param-name>jcifs.smb.client.password</param-name>
    <param-value>xxxxxx</param-value>
</init-param>
</filter>

<filter-mapping>
<filter-name>NtlmHttpFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

I'd appreciate any suggestions or thoughts on how to solve this issue.

Thank you,

--Todd

-----------------------------------------
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact
the sender by reply email and destroy all copies of the original
message.



More information about the jcifs mailing list