[jcifs] problem with NbtAddress.getAllByAddress()
ashish
ashishn at ntechra.com
Sun May 12 06:18:19 EST 2002
I am again back with the same problem.. but with more details....
nbtstat -A works fine.
but NbtAddress.getAllByAddress() or NbtAddress.getByName() fails.
Here's stack trace... I have set
Config.setProperty("jcifs.util.log","ALL")
trying first nbtstat
tried first nbtstat
java.net.UnknownHostException: no name with type 0x00 with no scope for host XX.XX.XX.XX
at jcifs.netbios.NbtAddress.getAllByAddress(NbtAddress.java:484)
at jcifs.netbios.NbtAddress.checkNodeStatusData(NbtAddress.java:627, Compiled Code)
at jcifs.netbios.NbtAddress.getMacAddress(NbtAddress.java:711, Compiled Code)
at CheckMac.main(CheckMac.java:54, Compiled Code)
press any key to exit...
Here's code snippet
String ip = "XX.XX.XX.XX";
System.out.println("trying first nbtstat");
NbtAddress addr1 = NbtAddress.getByName(ip) ;
System.out.println("tried first nbtstat");
byte[] array = addr1.getMacAddress() ;
String mac = StringUtils.bytesToHexString(array);
System.out.println("mac = "+mac);
I have replaced actual IP with "XX.XX.XX.XX"...
-------------- next part --------------
HTML attachment scrubbed and removed
More information about the jcifs
mailing list