[resolved] Exception in component tFileInputExcel_1

[resolved] Exception in component tFileInputExcel_1

Hello Guys,
I am trying to load the data from the XLS files inside  sub directories to MYSQL.
Basically there is a parent directory and inside that there are many sub directories in which XLS files are stored.
i am getting below error.
Starting job Mult_file at 02:52 11/08/2016.
connecting to socket on port 4054
connected
Exception in component tFileInputExcel_1
java.io.FileNotFoundException: C:\Users\Dinesh\Desktop\Investment\Input Files\XLS\Dec_15 (Access is denied)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at test1.mult_file_0_1.Mult_file.tFileList_1Process(Mult_file.java:1619)
at test1.mult_file_0_1.Mult_file.runJobInTOS(Mult_file.java:2788)
at test1.mult_file_0_1.Mult_file.main(Mult_file.java:2645)
disconnected
Job Mult_file ended at 02:52 11/08/2016.

In tFILELIST_1 the directory path is set to "C:/Users/Dinesh/Desktop/Investment/Input Files/XLS"
Please note that i am able to load all the excels from a directory if sub directories are not there. ie ,  if i define directory path as C:\Users\Dinesh\Desktop\Investment\Input Files\XLS\Dec_15  in tFileLIST_1.
Please help.
System : Windows 7 64 Bit
Thank,
Vanijyagyan

Accepted Solutions

Re: [resolved] Exception in component tFileInputExcel_1

Thanks cterenzi. I tried the approach you suggested but it didnt work.
However i am able to resolve this issue by setting Filelits Type to "Files". Earlier it was set to "Both"
Thanks,
VG

All Replies
Moderator

Re: [resolved] Exception in component tFileInputExcel_1

Hi,
Did you have "administrator" role for your system C disk? Could you please show us your whole job design?
Did you design you job like tfilelist-->tfileinputexcel?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

Re: [resolved] Exception in component tFileInputExcel_1

Hi,
Did you have "administrator" role for your system C disk? Could you please show us your whole job design?
Did you design you job like tfilelist-->tfileinputexcel?
Best regards
Sabrina

Thanks xdshi!! 
I have Administrator access , ie i am able to add/delete files in the directory. As i mentioned i am able to load the files from when there are no sub-directories.
Yes, i have designed the job like tFileList --> tFileInputExcel.
I am attaching the screen shots.
Thanks again,
VG
Moderator

Re: [resolved] Exception in component tFileInputExcel_1

Hi,
We can't see the screenshot on our side. Could you attach it on the forum, please? That would be great.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted

Re: [resolved] Exception in component tFileInputExcel_1

Attached.

Re: [resolved] Exception in component tFileInputExcel_1

getting this mssg when i try to upload screenshots.
It seems your post consisted of empty BBCodes only. It is possible that this happened because e.g. the innermost quote was discarded because of the maximum quote depth level.
One Star

Re: [resolved] Exception in component tFileInputExcel_1

Hi,
Dis you forgot the last / (or \) just before the filename?
Regards,
TRF

Re: [resolved] Exception in component tFileInputExcel_1

Thanks TRF for your response.
I think path is defined correctly.
In tFileList_1 component,
Directory : "C:/Users/Dinesh/Desktop/Investment/Input Files/XLS/"
include subdirectory checkbox is checked.
In tFileInputExcel_1
Filename/Stream : ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))
somehow i am not able to upload the images. I am using chrome browser
Thanks,
VG.
One Star

Re: [resolved] Exception in component tFileInputExcel_1

Are you sure to have read permission for all directories and files in C:/Users/Dinesh/Desktop/Investment/Input Files/XLS (including hidden elements)?
Does the error occur when launching the job into TOS or as an autonomous job?
Try to launch it when admin grants (right click then run as...)

Re: [resolved] Exception in component tFileInputExcel_1

Hi TRF,
Thanks, really appreciate for your help.
Yes, i have all rights. I even run the job as admin, still getting the same error.
from the below log error, i understand that exception is thrown from the tFileInputExcel_1  component.
Exception in component tFileInputExcel_1
java.io.FileNotFoundException: C:\Users\Dinesh\Desktop\Investment\Input Files\XLS\Dec-15 (Access is denied)
it seems like tFileInputExcel_1 is expecting an excel file but a directory is sent to it??? just a guess...
Thanks,
VG
Ten Stars

Re: [resolved] Exception in component tFileInputExcel_1

Are you setting a file mask in tFileList?  If not, it is probably returning every file in the directory tree.  Limiting it to *.xls and/or *.xlsx might do the trick.

Re: [resolved] Exception in component tFileInputExcel_1

Thanks cterenzi. I tried the approach you suggested but it didnt work.
However i am able to resolve this issue by setting Filelits Type to "Files". Earlier it was set to "Both"
Thanks,
VG
Moderator

Re: [resolved] Exception in component tFileInputExcel_1

Hi,

If the issue is closed, could you please click the "Set this topic as resolved" link which is right underneath your initial post? This way, other users will be informed that this thread has been resolved.


Best regards


Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.