| Author |
Getting File Not Found Exception
|
Kamal Bindra
Greenhorn
Joined: May 18, 2012
Posts: 8
|
|
Hi,
I am trying to upload a file to a ftp using sftp. when i try to upload the same file within an interval of 10 sec it behaves abnormaly.
It shows upload status as true for 2 attempts but shows the following logs with another attempt:
+++ Exception generated : com.sshtools.j2ssh.sftp.SftpSubsystemClient.getHandleResponse(Unknown Source)
com.sshtools.j2ssh.sftp.SftpSubsystemClient.openFile(Unknown Source)
com.sshtools.j2ssh.SftpClient.put(Unknown Source)
com.sshtools.j2ssh.SftpClient.put(Unknown Source)
com.sshtools.j2ssh.SftpClient.put(Unknown Source)
com.hds.sei.service.impl.FTPCSVUploadBusinessService.uploadCSVToFtp(FTPCSVUploadBusinessService.java:92)
com.hds.sei.service.impl.UploadProcessBusinessService.uploadParsedCSVFile(UploadProcessBusinessService.java:200)
com.hds.sei.service.impl.UploadProcessBusinessService.run(UploadProcessBusinessService.java:180)
com.hds.sei.threadpool.SubTPRunnable.run(SubTPRunnable.java:54)
com.hds.sei.threadpool.SystemThreadPool$TimedRunnable.run(SystemThreadPool.java:34)
com.hds.sei.threadpool.SimpleThreadPoolThread.run(SimpleThreadPoolThread.java:51)
CSV file Location for upload to FTP : D:/csv
ERROR 2012-05-18 12:19:50,143 (FTPCSVUploadBusinessService.java:108) - ====Exception : File not found
When i look into the location for file to upload to ftp, it exists at that location.Please help me with the cause for this exception and a resolution will be highly appreciated.
Thanks,
Kamal
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32830
|
|
Welcome to the Ranch
Please check that the file is accessible and that you have read permission on it. If you try to read a write-only file, or the file is locked by another application, for example, you suffer the same sort of exception.
|
 |
Kamal Bindra
Greenhorn
Joined: May 18, 2012
Posts: 8
|
|
Hi Campbell,
Thanks for your quick reply.
I tried to find the file permissions and found that it has both read and write permissions.
I am getting the same logs.
INFO 2012-05-21 11:16:10,876 (FTPCSVUploadBusinessService.java:85) - fileLocation2 is : D:\csv\1-98T567.csv
INFO 2012-05-21 11:16:10,876 (FTPCSVUploadBusinessService.java:88) - File2 exists...
INFO 2012-05-21 11:16:10,876 (FTPCSVUploadBusinessService.java:92) - Can Read.........
INFO 2012-05-21 11:16:10,876 (FTPCSVUploadBusinessService.java:96) - Can Write.........
ERROR 2012-05-21 11:16:14,218 (FTPCSVUploadBusinessService.java:111) - +++ Exception generated : com.sshtools.j2ssh.sftp.SftpSubsystemClient.getHandleResponse(Unknown Source)
com.sshtools.j2ssh.sftp.SftpSubsystemClient.openFile(Unknown Source)
com.sshtools.j2ssh.SftpClient.put(Unknown Source)
com.sshtools.j2ssh.SftpClient.put(Unknown Source)
com.sshtools.j2ssh.SftpClient.put(Unknown Source)
com.hds.sei.service.impl.FTPCSVUploadBusinessService.uploadCSVToFtp(FTPCSVUploadBusinessService.java:99)
com.hds.sei.service.impl.UploadProcessBusinessService.uploadParsedCSVFile(UploadProcessBusinessService.java:212)
com.hds.sei.service.impl.UploadProcessBusinessService.run(UploadProcessBusinessService.java:182)
com.hds.sei.threadpool.SubTPRunnable.run(SubTPRunnable.java:54)
com.hds.sei.threadpool.SystemThreadPool$TimedRunnable.run(SystemThreadPool.java:34)
com.hds.sei.threadpool.SimpleThreadPoolThread.run(SimpleThreadPoolThread.java:51)
Folder location for CSV file : /import
CSV file Location for upload to FTP : D:/csv
ERROR 2012-05-21 11:16:14,218 (FTPCSVUploadBusinessService.java:115) - ====Exception : File not found
Please help me with some resolution for this issue.
Thanks,
Kamal
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32830
|
|
|
I shall move this question because it is too difficult for “beginning”.
|
 |
Kamal Bindra
Greenhorn
Joined: May 18, 2012
Posts: 8
|
|
Hi Campbell,
Under which java forum i can find resolution to this issue.
Thanks,
Kamal
|
 |
Anayonkar Shivalkar
Bartender
Joined: Dec 08, 2010
Posts: 1295
|
|
Kamal Bindra wrote:Hi Campbell,
Under which java forum i can find resolution to this issue.
Thanks,
Kamal
The topic still can be seen in original forum (where you've started it - I guess that is 'Beginning Java'), however, when you open the post, you can see in which forum you are by taking a look at top of the first post (currently, the topic is in 'Java in General' forum).
I hope this helps.
|
Regards,
Anayonkar Shivalkar (SCJP, SCWCD, OCMJD)
|
 |
Kamal Bindra
Greenhorn
Joined: May 18, 2012
Posts: 8
|
|
Hi,
If anyone can please help me with this issue in this forum.
Any help will be highly appreciated.
Thanks,
Kamal
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32830
|
|
I don’t know myself.
I presume your file is not in use by any other programs? How are you identifying the file? Are you using a file chooser? Can you list the contents of the remote directory?
Apart from that, don’t know. And please don’t keep reminding us of the problem; such reminders do not produce quicker answers.
|
 |
 |
|
|
subject: Getting File Not Found Exception
|
|
|