Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I am having the .gzip files in FTP, we need to unarchive the files. I tried using tFileUnarchive component but i was getting the following error. Could any one help me on this.
Below is the error code
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)
[FATAL]: local_project.ksgfileloading_0_1.KSGFileLoading - tFileUnarchive_2 archive is not a ZIP archive
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 local_project.ksgfileloading_0_1.KSGFileLoading.tFileUnarchive_2Process(KSGFileLoading.java:1394)
at local_project.ksgfileloading_0_1.KSGFileLoading.tFileList_2Process(KSGFileLoading.java:1110)
at local_project.ksgfileloading_0_1.KSGFileLoading.tFileList_1Process(KSGFileLoading.java:645)
at local_project.ksgfileloading_0_1.KSGFileLoading.runJobInTOS(KSGFileLoading.java:1687)
at local_project.ksgfileloading_0_1.KSGFileLoading.main(KSGFileLoading.java:1521)
[statistics] disconnected
Thanks,
Bharath.
Hi,
Depending on your TOS version, GZIP format maybe not supported by tFileArchive/tFileUnarchive components.
Here is a workaround you may check for archinving https://www.linkedin.com/pulse/how-compressarchive-files-gzip-format-using-talend-open-vikram-takkar....
You'll probably be inspired for the reverse operation.
Thanks for the reply.
But in that link we don't have code to unarchive the .gzip files. we have only how to compress the file to .gzip format.
Thanks,
Bharath.
I didn't said this is the solution, I just said you'll probably be inspired by it.
Thanks for reply vineet.
I also referred the same site and achieved it. But any way thanks for reply.
Thanks,
Bharath.