[jcifs] jcifs.smb.SmbException: The system cannot find the path
specified.
jcifsatish
javasatheesh at gmail.com
Tue Jun 9 13:56:20 GMT 2009
Hi, I am getting below error while creating file. My method is executing in
multi thread model. Please suggest what could be the issue:
Method calling in multi threaded environment:
public void createFileWithContent(String fileStr, byte[] content, String
serverLocation, int hashCode) {
SmbFile file = getSmbFile(fileStr, serverLocation);
if ( isFileExists(fileStr, serverLocation) )
throw new CCServiceException(ErrorCodes.DUPLICATE_FILE);
SmbFileOutputStream out = null;
for ( int count = 0; count < CCConstants.CONNECTION_COUNT; count++ )
{
try {
file.createNewFile();
out = new SmbFileOutputStream(file, false);
if ( content != null ) {
out.write(content);
}
break;
} catch ( IOException ioe ) {
logger.warn("Failed to write to the file: " + fileStr + "
for " + (count + 1) + " times.");
;
if ( count + 1 == CCConstants.CONNECTION_COUNT ) {
logger.error("Error occurred while tring to write to the
file: " + fileStr, ioe);
throw new
CCServiceException(ErrorCodes.CANNOT_CREATE_FILE);
}
} finally {
if ( out != null ) {
try {
out.close();
} catch ( IOException e ) {
logger.warn(e.getMessage());
}
}
}
}
}
File Path:
---------
context path is :
smb://MYUSER;mypwd:mydomain@v0-231.netapp-b2.shhq.bbc.com/ccss4
full path is :
smb://MYUSER;mypwd:mydomain@v0-231.netapp-b2.shhq.bbc.com/ccss4/PROD01/BC/WKFL/ER/TEMP/20090604/140826/1244124506462.cdf.1.tmp
Error Message:
-------------
2009-06-04 09:08:26 [ERROR]
(com.bbc.app.onb.ac.common.util.SMBUtil.java:527) - Error occurred while
tring to write to the file:
PROD01/UP/WKFL/ER/TEMP/20090604/140826/1244124506462.cdf.1.tmp
jcifs.smb.SmbException: The system cannot find the path specified.
at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:514)
at jcifs.smb.SmbTransport.send(SmbTransport.java:614)
at jcifs.smb.SmbSession.send(SmbSession.java:239)
at jcifs.smb.SmbTree.send(SmbTree.java:109)
at jcifs.smb.SmbFile.send(SmbFile.java:695)
at jcifs.smb.SmbFile.open0(SmbFile.java:887)
at jcifs.smb.SmbFile.createNewFile(SmbFile.java:2522)
at
com.bbc.app.onb.ac.common.util.SMBUtil.createFileWithContent(SMBUtil.java:517)
I would appreciate greatly if you could provide me your advice at the
earliest.
Thank You
--
View this message in context: http://www.nabble.com/jcifs.smb.SmbException%3A-The-system-cannot-find-the-path-specified.-tp23943395p23943395.html
Sent from the Samba - jcifs mailing list archive at Nabble.com.
More information about the jcifs
mailing list