[jcifs] Re: Write files to shared location

Michael B Allen ioplex at gmail.com
Sun Dec 7 19:19:48 GMT 2008


On Sun, Dec 7, 2008 at 1:45 PM, Duseja, Sushil <sushil.duseja at fiserv.com> wrote:
> Hello,
>
> I am required to write/save (large number of) files (approx. 10000) to a
> (secured) shared drive location (using jCIFS 1.3.1). If a file with the same
> name already exists, a new file needs to be created with an index higher
> than the previous one.
>
> I am using the constuctor -
> SmbFile("smb://domain;username:password@server/..../") or this purpose and I
> can connect to the shared location successfully; however during the creation
> of files, after generating few files, an Smbexception is thrown.
>
> Here's the stacktrace:-
>
> jcifs.smb.SmbException: The parameter is incorrect.
>         at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:542)
>         at jcifs.smb.SmbTransport.send(SmbTransport.java:644)
>         at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:356)
>         at jcifs.smb.SmbSession.send(SmbSession.java:234)
>         at jcifs.smb.SmbTree.treeConnect(SmbTree.java:161)
>         at jcifs.smb.SmbTree.send(SmbTree.java:66)
>         at jcifs.smb.SmbFile.send(SmbFile.java:729)
>         at jcifs.smb.SmbFile.queryPath(SmbFile.java:1308)
>         at jcifs.smb.SmbFile.exists(SmbFile.java:1362)

Unless you're doing something bad like using multiple threads with the
same SmbFile instance, the "parameter is incorrect" error should never
occur and thus this would be a bug.

The fastest way to find out what's going on is to get a packet
capture. If you do get a packet capture of the error, make sure you
send it to me directly. Do not post packet captures to public mailing
lists.

Mike

PS: It's considered very bad form to use credentials in the URL. Use
(and re-use) an NtlmPasswordAuthentication object.

-- 
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/


More information about the jcifs mailing list