[jcifs] problem with NbtAddress.getAllByAddress()

Michael B. Allen miallen at eskimo.com
Sun May 12 17:29:07 EST 2002


On Sat, 11 May 2002 17:42:52 -0500
"Christopher R. Hertel" <crh at ubiqx.mn.org> wrote:

> Two things.
> 
> 1) Please don't send mail in HTML format.
> 
> 2) I'd like to see the output of nbtstat -A.
> 
> Chris -)-----
> 
> > ashish wrote:
> > 
> > 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"...

Ashish,

You're building a bit of a reputation for not giving enough
information. The last time we talked about this, it took you three
round trips to tell us you were trying to do this over PPP and that
it worked on your local LAN. I don't care if your trying to hack into
dialup connections but don't post half-truths when we know the code
works. It's up to you to tell us what is uniqe about your setup that
causes the code to fail. Just because you can do nbtstat doesn't mean
that XP will respond to node status. It could be getting that information
via other means. And if XP does not respond to node status on port 139
you are SOL. Did you try setting jcifs.netbios.laddr or whatever it was
that I said to do the last time?

> > 
> > 
> > 
> > 
> 
> -- 
> Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
> jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
> ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
> OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org
> 


-- 
May The Source be with you.





More information about the jcifs mailing list