tfileUnarchive Error : "invalid distance too far back"

Highlighted
Five Stars

tfileUnarchive Error : "invalid distance too far back"

I am trying to unzip multiple files.

I tried following the solution posted here https://www.talendforge.org/forum/viewtopic.php?id=35567 but I am getting an error which I am unable to resolve.

 

Exception in component tFileUnarchive_1 (tJobETL1)
java.util.zip.ZipException: invalid distance too far back
	at java.util.zip.InflaterInputStream.read(Unknown Source)
	at java.util.zip.GZIPInputStream.read(Unknown Source)
	at com.talend.compress.zip.Util.output(Util.java:66)
	at sb_etl_test1.tjobetl1_0_1.tJobETL1.tFileList_1Process(tJobETL1.java:577)
	at sb_etl_test1.tjobetl1_0_1.tJobETL1.runJobInTOS(tJobETL1.java:915)
	at sb_etl_test1.tjobetl1_0_1.tJobETL1.main(tJobETL1.java:764)
[statistics] disconnected

Below is my workflow

tFileList   ~~~~~~~~>  tFileUnarchive

 

ErrorError

 

 

 

 

 

 

 

 

 

 

 

 

 

tFileListComponenttFileListComponent

 

 

 

 

 

 

 

 

 

 

 

 

 

tUnArchiveComponenttUnArchiveComponent

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Thanks.


Accepted Solutions
Highlighted
Five Stars

Re: tfileUnarchive Error : "invalid distance too far back"

I got it working.

I changed tFTPGet component. 

 

from ___ Transfer Mode = ascii  

to ___ Transfer Mode = binary

 

That solved the issue.

View solution in original post


All Replies
Highlighted
Sixteen Stars
Sixteen Stars

Re: tfileUnarchive Error : "invalid distance too far back"

Hi,
In many cases this error occurs for corrupted archive files.
Are you able to rebuild the archive or to get a new or different one?

TRF
Highlighted
Five Stars

Re: tfileUnarchive Error : "invalid distance too far back"

Hi TRF,
You were right. That Zip file was corrupt. I used tFTPGet to download that zip file.
When I download the same file using WINSCP it comes out fine. Where am I going wrong ?
Highlighted
Five Stars

Re: tfileUnarchive Error : "invalid distance too far back"

I got it working.

I changed tFTPGet component. 

 

from ___ Transfer Mode = ascii  

to ___ Transfer Mode = binary

 

That solved the issue.

View solution in original post

Highlighted
Sixteen Stars
Sixteen Stars

Re: tfileUnarchive Error : "invalid distance too far back"

Great!

Binary mode is required as soon as the transfer is not for a pure text file, that explains why you get the error for an archive file.

Thank's to mark your case as solved.


TRF

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog