[jcifs] "A duplicate name exists on network" when a host has
praveen.public at gmail.com
Mon Oct 17 08:32:08 GMT 2005
I am working with 1.2.1 and I am getting errors when working with a host
that has multiple names. (eg: deathstar = zpac23 =
For example, when I run the ListFiles example:
java ListFiles smb://deathstar/ ------- works
java ListFiles smb://zpac23/ ------- does not
java ListFiles smb://172.25.181.23/ ------- works
Dumping the contents of InetAddress for this host reveal that
getHostName() = "deathstar" and
getCanonicalHostName() = "zpac23"
I am afraid I don't know exactly what kind of machine this is at this time
(some Windows) but my client is running a linux 2.4.26 derivative and it is
talking to the server on port 445 - naked tcp.
Any solution? Has anyone seen this before?
P.S. I am using dnsjava <http://www.xbill.org/dnsjava/> for DNS name
resolution and the InetAddress retuned by it always has getHostName() =
getCanonicalHostName() = "zpac23" regardless of what name I use with
getByName(), so it never works in there. It seems to be an error on
dnsjava's part because, as per documentation of InetAddress.getHostName(),
"If this InetAddress was created with a host name, this host name will be
remembered and returned;...."
-------------- next part --------------
HTML attachment scrubbed and removed
More information about the jcifs