<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Hi,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>                Any ideas?<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>                Thanks<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>JL<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><p class=MsoNormal><span lang=FR-CH style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:gray'>-------------------------------</span><span lang=FR-CH style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><b><span lang=FR-CH style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:gray'>José  Luis Martínez-Avial</span></b><span lang=FR-CH style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:gray'><o:p></o:p></span></p><p class=MsoNormal><span lang=FR-CH style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:gray'>Web Applications Global Head<o:p></o:p></span></p><p class=MsoNormal><span lang=FR-CH style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:gray'>Information Technology</span><span lang=FR-CH style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span lang=FR-CH style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:red'>Santander Private Banking</span><span lang=FR-CH style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span lang=FR-CH style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span lang=FR-CH style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:gray'>1401 Brickell Avenue, Suite 1500, Miami FL 33131</span><span lang=FR-CH style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span lang=FR-CH style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:gray'>Phone: 305.539.2417</span><span lang=FR-CH style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#1F497D'><o:p></o:p></span></p></div><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Jose Luis Martinez Avial <br><b>Sent:</b> Friday, September 13, 2013 6:52 PM<br><b>To:</b> jcifs@samba.org<br><b>Subject:</b> Error writing to a share folder<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hello,<o:p></o:p></p><p class=MsoNormal>                I’m having some issues writing to a share folder in a Windows server (I don’t know the specific windows version).I basically create a SmbFile, and then a SmbFileOutputStream with that file, and start writing on that stream in blocks of 100k:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>                private void writeFIS2server(InputStream fis, String path, String fileName) throws Exception {<o:p></o:p></p><p class=MsoNormal>                                log.debug("writeFIS2server start");<o:p></o:p></p><p class=MsoNormal>                                System.setProperty("jcifs.util.loglevel", "3");<o:p></o:p></p><p class=MsoNormal>                                OutputStream os = openTargetStream(smbDomain, smbUser, smbPassword, path + "/" + fileName);<o:p></o:p></p><p class=MsoNormal>                                copy(fis, os);<o:p></o:p></p><p class=MsoNormal>                                log.debug("writeFIS2server end");<o:p></o:p></p><p class=MsoNormal>                }<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>                private OutputStream openTargetStream(String domain, String user, String password, String unc) throws Exception {<o:p></o:p></p><p class=MsoNormal>                                return openTargetStream(new NtlmPasswordAuthentication(domain, user, password), unc);<o:p></o:p></p><p class=MsoNormal>                }<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>                private OutputStream openTargetStream(NtlmPasswordAuthentication auth, String unc) throws Exception {<o:p></o:p></p><p class=MsoNormal>                                SmbFile sFile = new SmbFile(unc, auth);<o:p></o:p></p><p class=MsoNormal>                                sFile.createNewFile();<o:p></o:p></p><p class=MsoNormal>                                return new SmbFileOutputStream(sFile);<o:p></o:p></p><p class=MsoNormal>                }<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>                private void copy(InputStream in, OutputStream out) throws IOException {<o:p></o:p></p><p class=MsoNormal>                                System.out.println("copy start");<o:p></o:p></p><p class=MsoNormal>                                // Transfer bytes from in to out<o:p></o:p></p><p class=MsoNormal>                                int bufferSize = 1024*100;<o:p></o:p></p><p class=MsoNormal>                                byte[] buf = new byte[bufferSize];<o:p></o:p></p><p class=MsoNormal>                                int len;<o:p></o:p></p><p class=MsoNormal>                                int counter = 1;<o:p></o:p></p><p class=MsoNormal>                                while ((len = in.read(buf)) > 0) {<o:p></o:p></p><p class=MsoNormal>                                                System.out.println("Copying block "+counter+" with "+len+" bytes");<o:p></o:p></p><p class=MsoNormal>                                                out.write(buf, 0, len);<o:p></o:p></p><p class=MsoNormal>                                                out.flush();<o:p></o:p></p><p class=MsoNormal>                                                counter++;<o:p></o:p></p><p class=MsoNormal>                                }<o:p></o:p></p><p class=MsoNormal>                                in.close();<o:p></o:p></p><p class=MsoNormal>                                out.close();<o:p></o:p></p><p class=MsoNormal>                                System.out.println("copy end");<o:p></o:p></p><p class=MsoNormal>                }<o:p></o:p></p><p class=MsoNormal>}<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>                The issue is that for each out.write, I see a bunch of logs:<o:p></o:p></p><p class=MsoNormal>jcifs.smb.SmbException: The system cannot find the file specified.<o:p></o:p></p><p class=MsoNormal>        at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:563)<o:p></o:p></p><p class=MsoNormal>        at jcifs.smb.SmbTransport.send(SmbTransport.java:640)<o:p></o:p></p><p class=MsoNormal>        at jcifs.smb.SmbSession.send(SmbSession.java:238)<o:p></o:p></p><p class=MsoNormal>        at jcifs.smb.SmbTree.send(SmbTree.java:119)<o:p></o:p></p><p class=MsoNormal>[…] <o:p></o:p></p><p class=MsoNormal>        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)<o:p></o:p></p><p class=MsoNormal>        at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)<o:p></o:p></p><p class=MsoNormal>doConnect: 0.0.0.0<00>/xxx.xxx.xxx.xxx<o:p></o:p></p><p class=MsoNormal>open0: \yyyyyy\DT1317500232.pdf<o:p></o:p></p><p class=MsoNormal>jcifs.smb.SmbException: The system cannot find the file specified.<o:p></o:p></p><p class=MsoNormal>        at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:563)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>                The file is copied correctly, but the error messages are bothering me. I’m using jcifs 1.3.17, with the default configuration, and I’m using the IP address of the server, not the server name. What could be the problem. I took a tcpdump while copying the files, so I can provide it if needed.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>                Thank you all<o:p></o:p></p><p class=MsoNormal>JL <o:p></o:p></p><p class=MsoNormal><span lang=FR-CH style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:gray'>-------------------------------</span><span lang=FR-CH style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><b><span lang=FR-CH style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:gray'>José  Luis Martínez-Avial</span></b><span lang=FR-CH style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:gray'><o:p></o:p></span></p><p class=MsoNormal><span lang=FR-CH style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:gray'>Web Applications Global Head<o:p></o:p></span></p><p class=MsoNormal><span lang=FR-CH style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:gray'>Information Technology</span><span lang=FR-CH style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span lang=FR-CH style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:red'>Santander Private Banking</span><span lang=FR-CH style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span lang=FR-CH style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span lang=FR-CH style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:gray'>1401 Brickell Avenue, Suite 1500, Miami FL 33131</span><span lang=FR-CH style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span lang=FR-CH style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:gray'>Phone: 305.539.2417</span><span lang=FR-CH style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>
<p>

Internet communications are not secure and therefore Banco <br>
Santander International does not accept legal responsibility for <br>
the contents of this message. Any views or opinions presented <br>
are solely those of the author and do not necessarily represent <br>
those of Banco Santander International unless otherwise <br>
specifically stated. <br>
<br>
Las comunicaciones vía Internet no son seguras y, por lo tanto,<br>
Banco Santander International no asume responsabilidad legal <br>
ni de ningún otro tipo por el contenido de este mensaje. <br>
Cualquier opinión transmitida pertenece únicamente al autor y <br>
no necesariamente representa la opinión de Banco Santander <br>
International, a no ser que esté expresamente detallado.<br>
</p>