
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Error While Extracting the Zip File in TOS 6.3 and 7.3 using tFileUnarchive component
I have a zip file inside another zip file and when I extract the outer zip its extracting and when I am trying to extract the inner zip it is throwing me an error: Error: Windows cannot open the folder The compressed zip folder abc.zip is empty. But it is working when I am extracting the inner zip file using 7zip in windows machine.
The same thing I'm trying it in TOD for bigdata in 6.3 and 7.3 the outer zip file is fine but while Im extracting the inner zip file I'm getting below error. Can somebody please suggest on this?
TOS(6.3) Error:
Starting job Sample at 07:46 16/02/2021.
[statistics] connecting to socket on port 3356
[statistics] connected
Processing archive C:/Users/abc.zip, please wait...
Exception in component tFileUnarchive_2
java.util.zip.ZipException: archive is not a ZIP archive
at org.apache.commons.compress.archivers.zip.ZipFile.positionAtEndOfCentralDirectoryRecord(ZipFile.java:847)
at org.apache.commons.compress.archivers.zip.ZipFile.positionAtCentralDirectory(ZipFile.java:777)
at org.apache.commons.compress.archivers.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:522)
at org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:216)
at org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:192)
at org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:164)
at com.talend.compress.zip.Unzip.doUnzipWithoutDecryption(Unzip.java:191)
at com.talend.compress.zip.Unzip.doUnzip(Unzip.java:76)
at gannett.sample_0_1.Sample.tFileUnarchive_2Process(Sample.java:1230)
at gannett.sample_0_1.Sample.runJobInTOS(Sample.java:2165)
at gannett.sample_0_1.Sample.main(Sample.java:1350)
[statistics] disconnected
Job Sample ended at 07:46 16/02/2021. [exit code=1]
TOS 7.3 Error:
Starting job Sample at 08:00 16/02/2021.
[statistics] connecting to socket on port 3527
[statistics] connected
Processing archive C:/Users/abc.zip, please wait...
archive is not a ZIP archive
[statistics] disconnected
Job Sample ended at 08:00 16/02/2021. [exit code=0]

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the file path you set for the inner zip file? I think you need two steps, one for the outer zip, and another step for inner zip.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Correct, I agree with Shong. I had exactly similar situation and I was able to do it in a 2 step approach.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Team for the response!!
Sorry for my very late response and the issue was something else...I conveyed it wrongly, It was a 7zip file and I was not able to zip it directly in Talend. I got the solution by using below command in the tsystem component
"cmd /c 7z e "+context.local_filepath_abc+"ABC/ABCD/FILE_NAME_"+context.created_date+".zip -o"+context.local_filepath_abc+"ABC/ABCD/ABCD_Weekly_Files"..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Sravan Reddy , yes, tFileUnarchive component does not support 7 zip file. Thanks for sharing the solution!
Regards
Shong
