[jcifs] Having problem with simply connecting with release 1.2.9

Dalton, Tim Daltontf at AGEDWARDS.com
Mon Apr 24 19:10:34 GMT 2006


Never mind, I forget that we tweaked the 1.2.7 code to work around this. So saying this worked under 1.2.7 is not exactly accurate.

Thanks
Tim

-----Original Message-----
From: Michael B Allen [mailto:mba2000 at ioplex.com]
Sent: Monday, April 24, 2006 2:04 PM
To: Dalton, Tim
Cc: jcifs at lists.samba.org
Subject: Re: [jcifs] Having problem with simply connecting with release
1.2.9


On Mon, 24 Apr 2006 10:24:04 -0500
"Dalton, Tim" <Daltontf at AGEDWARDS.com> wrote:

> The following beanshell code works just fine with 1.2.7:
> 
> import jcifs.smb.*; 
> import java.io.*;
> 
> file = new SmbFile("smb://HOME;daltontf:xxxxxxx@tdms1.agedwards.com/root/home/daltontf/testsmb.txt");
> smbout = new PrintStream(new SmbFileOutputStream(file, true));
> smbout.println("This is a test - " + new java.util.Date().toString());
> smbout.close();
> 
> But with release 1.2.9, I get:
> 
> java.lang.NullPointerException
>         at jcifs.smb.SmbComSessionSetupAndX.writeParameterWordsWireFormat(SmbComSessionSetupAndX.java:58)
>         at jcifs.smb.AndXServerMessageBlock.writeAndXWireFormat(AndXServerMessageBlock.java:94)
>         at jcifs.smb.AndXServerMessageBlock.encode(AndXServerMessageBlock.java:65)
>         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)
>         at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:269)
>         at jcifs.smb.SmbSession.send(SmbSession.java:225)
>         at jcifs.smb.SmbTree.treeConnect(SmbTree.java:147)
>         at jcifs.smb.SmbFile.connect(SmbFile.java:791)
>         at jcifs.smb.SmbFile.connect0(SmbFile.java:761)
>         at jcifs.smb.SmbFile.queryPath(SmbFile.java:1167)
>         at jcifs.smb.SmbFile.length(SmbFile.java:2160)
>         at jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:129)
>         at jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:97)
> 
> Am I doing something fundamentally wrong ?

No. The client should never throw a NullPointerException (except perhaps
if an inappropriate null parameter is passed to a method). So there's a
bug somewhere.

The place where the exception is occuring indicates that
NtlmPasswordAuthentication.accountPassword is null. Given the example
code and the claim that this does not occur in 1.2.7 the only change
that I think could have an impact is the jcifs.encoding default being
changed to Cp850. But even then I don't see how this can happen. I could
not reproduce the error using the attached example program.

1) Crank up jcifs.loglevel and see if there are any other exceptions
2) Try setting jcifs.encoding=ASCII or jcifs.encoding=Cp1252

Otherwise, I can only guess that your report is inaccurate and that you
are in fact setting other properties and/or the environemnt has changed
and that the bug actually exists in 1.2.7 as well. In this case you will
need to reanalyze and resubmit your issue.

Also, is DFS somehow involved?

Mike


-------------------------------------------------------------------------------------
A.G. Edwards & Sons' outgoing and incoming e-mails are electronically
archived and subject to review and/or disclosure to someone other 
than the recipient.

-------------------------------------------------------------------------------------



More information about the jcifs mailing list