[jcifs] NullPointer Exceptions with OES2

Travis Ennis travis.ennis at gmail.com
Wed Oct 20 13:56:52 MDT 2010


Just to see if I could do anything with the fact that the
LastNameOffset in the Trans2FindFirst2Response object points to the
immediately *after* the last entry in the file list, I added the
following to the Trans2FindFirst2Response class on line 158 in version

// >>OES2 Fix
if(CIFS_IMPL.equals("OES2")) {
    bufferIndex += 1;
else {
    bufferIndex += 2;
// OES2 Fix<<

This changes works in that it is now possible to list
files/directories in shares that contain over 2000 files/directories.
However, it causes problems if you have the jcifs.smb.client.listCount
or jcifs.smb.client.listSize property set to anything but the default.
I've yet to discover the pattern under which the failure occurs, but
the exception that is thrown is always the IOException thrown in the
doRecv method of the SmbTransport class. It seems the size is always
bigger than the rcv_buf_size when the failure occurs.

Any ideas?


On Mon, Oct 18, 2010 at 11:53 AM, Travis Ennis <travis.ennis at gmail.com> wrote:
> Hi Mike,
> I have begun working on the issue that is discussed below under the
> original subject of "StackTrace from Novell Open Enterprise Server 2."
> I was wondering if you might share any insight on what you think the
> issue might be and what might be done to fix it. I'm trying to speed
> things along and if you could help me get past the stage where I'm
> just digging through the code trying to figure out what is happening.
> Thanks,
> Travis
>>> Thu Jul 8 12:21:05 MDT 2010
> Hi Roger,
> The LastNameOffset in the Trans2FindFirst2Response in your packet
> capture (which you stated is Novell OES 2) points to the byte
> immediately *after* the last entry in the file list.
> Windows always points to the beginning of the last entry as would be
> expected. Although historically this field has always been a little
> troubled. Windows 98 used returns a value that falls between the
> begging and end of the last entry (and last I checked JCIFS handles
> this properly). But I've never seen LastNameOffset point beyond the
> end of the last entry.
> I have added this issue to the TODO list. I'm not sure when I'll get
> around to fixing it but at least we have a definitive diagnosis
> (actually the correct place to file the bug report would be with
> Novell).
> Mike
> On Tue, Jul 6, 2010 at 11:08 AM, Roger Thomas <rthomas at stone-ware.com> wrote:
>> Did the packet captures show the problem?   Is there anything else I can get
>> for you?
> --
> Michael B Allen
> Java Active Directory Integration
> http://www.ioplex.com/
> --
> Travis Ennis

Travis Ennis

More information about the jCIFS mailing list