[jcifs] RE: Write files to shared location
Duseja, Sushil
sushil.duseja at fiserv.com
Mon Dec 8 15:15:49 GMT 2008
Hello Mike,
Thanks for the response.
You are right; I am using multiple threads with one SmbFile instance but
that is precisely my requirement. I need to use multiple threads for the
processing (that includes creating files).
Can you please suggest a workaround? Or else, can you please let me know
if I can use java.io.File instance for my purpose (creating files at
password protected network location)?
Thanks!
-----Original Message-----
From: Michael B Allen [mailto:ioplex at gmail.com]
Sent: Monday, December 08, 2008 12:50 AM
To: Duseja, Sushil
Cc: jcifs at lists.samba.org
Subject: Re: Write files to shared location
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