[jcifs] Re: UnknownHostException for wins server

Rafal saski at poczta.onet.pl
Fri Mar 24 13:51:31 GMT 2006


Michael B Allen <mba2000 <at> ioplex.com> writes:

> 
> I think the multiple WINS servers thing was added in 1.2.
> 

As far as I know multiple wins support was added in version 0.9. I tested 
it also with version 1.2.7 and got the same error.
I debugged jcifs.Config.getInetAddressArray function and found that wins IP 
address is retrieved from token with backslash at the end:
for example:

String addr = tok.nextToken();

returns address below:

10.174.8.101\

Then function: 

arr[i] = InetAddress.getByName( addr ); 

is called with IP address with backslash as an argument and returns: 
java.net.UnknownHostException: 10.174.8.101\: 10.174.8.101\

I modified jcifs.Config.getInetAddressArray function and made it remove 
backslash from IP address and it works. 
But still I don’t know why IP address is retrieved with backslash at the end. 
My jcifs.netbios.wins property is set to 10.174.8.101,10.174.8.102. But 
according to log files from application server:

jcifs.netbios.wins=10.174.8.101\\,10.174.8.102
and
file.separator=\\ 

So I think that application server modifies Wins IP address before it is sent 
to jcifs. 

Do you have any other ideas how to handle with this problem? 





More information about the jcifs mailing list