[jcifs] StringIndexOutOfBoundsException from SmbFile.java

Michael B Allen mba2000 at ioplex.com
Tue Oct 7 12:40:32 EST 2003


This is the real problem:

Oct 6 16:15:32.568 - net server enum response entry
ServerInfo1[name=,versionMajor=4,versionMinor=5,type=0x80001000,commentOrMasterBrowser=MORDRED]

The server name is blank. Not sure what I'm suppose to do about that. I
guess I'll just ignore entries with blank server names considering the
server name is required to do anything usedfull there-after.

Mike

> Posted.
>
> Michael B Allen wrote:
>
>>Run this with -Dlog=ALL and post the OP.
>>
>>java -cp ../../jcifs-0.7.13.jar:. -Dlog=ALL ListFiles smb://
>>
>>
>>
>>>I'm getting a StringIndexOutOfBoundsException from SmbFile.java from a
>>>ListFiles query with the smb url "smb://":
>>>
>>>java -cp ../../jcifs-0.7.13.jar:. ListFiles smb://
>>>Exception in thread "main" java.lang.StringIndexOutOfBoundsException:
>>>String index out of range: -1
>>>       at java.lang.String.charAt(String.java:444)
>>>       at jcifs.smb.SmbFile.<init>(SmbFile.java:503)
>>>       at jcifs.smb.SmbFile.listFiles(SmbFile.java:1357)
>>>       at jcifs.smb.SmbFile.listFiles(SmbFile.java:1303)
>>>       at ListFiles.main(ListFiles.java:13)
>>>
>>>
>>
>>
>>
>


-- 
A program should be written to  model the concepts of the task it
performs rather than the physical world or a process because this
maximizes the  potential for it  to be applied  to tasks that are
conceptually similar and, more  important, to tasks that have not
yet been conceived.



More information about the jcifs mailing list