[jcifs] RE: JCFIS java.lang.NullPointerException

Daniel Rychlik drychlik at securustech.net
Tue Nov 7 17:18:04 GMT 2006

Thanks so much for this help.  

-----Original Message-----
From: Michael B Allen [mailto:mba2000 at ioplex.com] 
Sent: Tuesday, November 07, 2006 11:15 AM
To: Daniel Rychlik
Cc: Daniel Rychlik; jcifs at lists.samba.org
Subject: Re: [jcifs] RE: JCFIS java.lang.NullPointerException

This error has been discussed before. You can google the jCIFS archives
very easily with search parameters like:

  site:lists.samba.org/archive/jcifs writeParameterWordsWireFormat

The JRE you're using doesn't support the Cp850 encoding but the NetBeans
one does because it's the JDK. Set jcifs.encoding to ASCII (or it might
be "US-ASCII", can't remember) like:

  jcifs.Config.setProperty("jcifs.encoding", "ASCII");

Note that this is not a bug but the UnsupportedEncoding exception being
caught and ignored is (thanks Chuck). That is on The List. Also, since
this should only occur when the client communicates with a server that
doesn't support Unicode (e.g. old Samba servers, Windows 98, etc) I
I should change the encoding used when computing the ASNI password hash
from ServerMessageBlock.OEM_ENCODING to "ASCII".


On Tue, 7 Nov 2006 08:23:32 -0600
"Daniel Rychlik" <drychlik at securustech.net> wrote:

> I don___t understand this at all...  I am getting down to the wire to
get this project completed but this doesn___t work when compiled into a
jar file...  Even this simple example fails in a jar, but works in
Netbeans IDE...  Anyone have any advice?
> C:\>java -jar "Documents and
> Exception in thread "main" java.lang.NullPointerException
>         at
> a:58)
>         at
>         at
>         at jcifs.smb.SmbTransport.doSend(SmbTransport.java:402)
>         at jcifs.util.transport.Transport.sendrecv(Transport.java:70)
>         at jcifs.smb.SmbTransport.send(SmbTransport.java:602)

Michael B Allen
PHP Active Directory SSO

More information about the jcifs mailing list