[jcifs] Re: NullPointerException in NbtAddress.java

Michael B Allen mba2000 at ioplex.com
Thu Feb 17 06:25:56 GMT 2005


On Wed, 16 Feb 2005 20:21:19 -0800
"Alan Moore" <amoore at ciphergen.com> wrote:

> The hostname is *not* in the /etc/hosts file as mentioned in the FAQ. Only
> the loopback/localhost entry is in there.
>  
> There are several bug parade items about similar behavior, including:
>  
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4665037
>  
> We are trying to get our system working in the following configurations:
>  
> 1) static ip, no DNS, samba server (nmbd only), jcifs client is used for
> name resolution to find other computers on the same subnet.

This is just a resolver issue. I don't know how getLocalHost resolves the
local machines real IP but jCIFS simply isn't going to work without the
right IP for the network interface.

> Short of placing the static ip address/hostname in the /etc/hosts file,
> what can we do to prevent this problem?

Why is that such a big deal? With no DNS it's probably the right config.

> BTW -  placing jcifs.netbios.laddr=127.0.0.1 into the jcifs.properties
> file prevents the NullPointerException in NbtAddress but host name lookups
> fail (e.g. UniAddress.getLocalHost(host).getHostName() fails.)

Well yeah, unless the nmbd server is also bound to that address your not
going to be able to communicate with anything over loopback.

You could set laddr to the right IP.

Mike

-- 
IRC - where men are men, women are men, and the boys are FBI agents.


More information about the jcifs mailing list