NullPointerException at jcifs.netbios.NbtAddress

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

NullPointerException at jcifs.netbios.NbtAddress

dhillenb

I was hoping for some direction on this problem.  I have machines that are sitting right next to each other
on the same net accessing the same share. Most work but some get the Nullpointer below.

JVM - General Failure, rc=1
Unhandled error on thread UI Applet
java.lang.ExceptionInInitializerError: java.lang.NullPointerException
at java.lang.Throwable.(Throwable.java:54)
at java.lang.Throwable.(Throwable.java:68)
at java.lang.NullPointerException.(NullPointerException.java:42)
at jcifs.netbios.NbtAddress.(NbtAddress.java:199)
at java.lang.Class.initializeImpl(Native Method)
at java.lang.Class.initialize(Class.java:326)
at jcifs.UniAddress.(UniAddress.java:62)
at java.lang.Class.initializeImpl(Native Method)
at java.lang.Class.initialize(Class.java:326)
at jcifs.smb.SmbFile.getAddress(SmbFile.java:757)
at jcifs.smb.SmbFile.connect(SmbFile.java:785)
at jcifs.smb.SmbFile.connect0(SmbFile.java:762)
at jcifs.smb.SmbFile.getType(SmbFile.java:1115)
at jcifs.smb.SmbFile.canRead(SmbFile.java:1289)



I have compared configs and  have trouble seeing any differences.  I seems things do not work at all without
a Dns server even when using Ip address.  I have seen trouble when  using a static Ip address . Any explanation of the sequence of events when trying to resolve a name would be appreciated.



Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException at jcifs.netbios.NbtAddress

Michael B Allen-4
>From looking at the code it looks like InetAddress.getLocalHost is
returning null. I don't recall off the top of my head why this occurs
but it has to do with the local system cofiguration. Try:

$ hostname

on both systems and see if you see an inconsistency. I think if it returns
'localhost' or '127.0.0.1' that will cause problems with JCIFS. One way
to hack around this is to add an entry in /etc/hosts.

Search the archives on google like:

  site:http://lists.samba.org/ jcifs localhost NullPointerException

etc.

Mike


On Tue, 21 Mar 2006 13:27:27 -0500
[hidden email] wrote:

> I was hoping for some direction on this problem.  I have machines that are
> sitting right next to each other
> on the same net accessing the same share. Most work but some get the
> Nullpointer below.
>
> JVM - General Failure, rc=1
> Unhandled error on thread UI Applet
> java.lang.ExceptionInInitializerError: java.lang.NullPointerException
>  at java.lang.Throwable.(Throwable.java:54)
>  at java.lang.Throwable.(Throwable.java:68)
>  at java.lang.NullPointerException.(NullPointerException.java:42)
>  at jcifs.netbios.NbtAddress.(NbtAddress.java:199)
>  at java.lang.Class.initializeImpl(Native Method)
>  at java.lang.Class.initialize(Class.java:326)
>  at jcifs.UniAddress.(UniAddress.java:62)
>  at java.lang.Class.initializeImpl(Native Method)
>  at java.lang.Class.initialize(Class.java:326)
>  at jcifs.smb.SmbFile.getAddress(SmbFile.java:757)
>  at jcifs.smb.SmbFile.connect(SmbFile.java:785)
>  at jcifs.smb.SmbFile.connect0(SmbFile.java:762)
>  at jcifs.smb.SmbFile.getType(SmbFile.java:1115)
>  at jcifs.smb.SmbFile.canRead(SmbFile.java:1289)
>
>
> I have compared configs and  have trouble seeing any differences.  I seems
> things do not work at all without
> a Dns server even when using Ip address.  I have seen trouble when  using
> a static Ip address . Any explanation of the sequence of events when
> trying to resolve a name would be appreciated.
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException at jcifs.netbios.NbtAddress

Michael B Allen-4
In reply to this post by dhillenb
Ok. Cc'd the list for posterity.

On Thu, 23 Mar 2006 15:42:59 -0500
[hidden email] wrote:

> Thanks for the info!  I was able to get one of the problem machines to
> work by setting the
> client.laddr and netbios.laddr with iether the DNS name or the ip address.
>