Catch error of Exception in component tFileUnarchive_1 java.io.IOExcep

One Star

Catch error of Exception in component tFileUnarchive_1 java.io.IOExcep

Hi,
When a corrupted file is asked to be unarchive, I have an exception like this one.
Exception in component tFileUnarchive_1
java.io.IOException: Negative seek offset
at java.io.RandomAccessFile.seek(Native Method)
at org.apache.tools.zip.ZipFile.positionAtCentralDirectory(ZipFile.java:365)
at org.apache.tools.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:243)
at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:142)
at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:113)
at proto.perfweb.PERFWEB.tFileList_1Process(PERFWEB.java:237)
at proto.perfweb.PERFWEB.runJob(PERFWEB.java:413)
at proto.perfweb.PERFWEB.main(PERFWEB.java:360)

There is a tLogCatcher but the Java trace is on the console (anothers errors are welle catched by tLogCatcher).
Does anyone have an idea, please?
Thank you
One Star

Re: Catch error of Exception in component tFileUnarchive_1 java.io.IOExcep

Hi
What's your file type?
The component tFileUnarchive can support '.zip' files.
For other file types, you may use tSystem to call command to unzip files.
Best regards!
Pedro
One Star

Re: Catch error of Exception in component tFileUnarchive_1 java.io.IOExcep

Thank you Pedro. It's a non-zip file, but I'd predfer that Talend Job wouldn't write a Java Exception in the command line and give me only a ComponentError.
Maybe with "Check the file before unzipp"?
One Star

Re: Catch error of Exception in component tFileUnarchive_1 java.io.IOExcep

Hi
A Java Exception will be thrown in console which is hard coded in Talend Java source code.
You can't get rid of it.
Try "Check the integrity before unzip".
Besides, what's your TOS version?
Best regards!
Pedro
One Star

Re: Catch error of Exception in component tFileUnarchive_1 java.io.IOExcep

Hi,
Thanks for your answer. Bad news that we can't catch those error. If I check or not this option, I allways have a trace.
The TOS version : 4.2.2
One Star

Re: Catch error of Exception in component tFileUnarchive_1 java.io.IOExcep

Hi
It's wierd.
I have reproduced this issue in TOS 4.0.1 and in TOS 5.0.0. tLogCatcher can catch those errors.
Make sure you have checked 'Catch Java Exception'.
If still, please let me know and show me the screenshot of your job.
Or you may try it in TOS 5.0.0.
Best regards!
Pedro
One Star

Re: Catch error of Exception in component tFileUnarchive_1 java.io.IOExcep

Hi.
I'm now on 5.0.1 and allways have the same problem.

How to reproduce :
1. take a file (like .jpg) and rename as .zip (It's not a zip file but it's look like)
2. Try to unarchive with tFileUnarchive
There is a Java stack in spite of tLogCatcher who catch those error
One Star

Re: Catch error of Exception in component tFileUnarchive_1 java.io.IOExcep

Up!
One Star

Re: Catch error of Exception in component tFileUnarchive_1 java.io.IOExcep

Hi
Sorry for my delay to answer.
As I said in post #4, a Java Exception will be thrown on console which is hard coded in Talend Java source code.
You can't get rid of it.
Regards,
Pedro
One Star

Re: Catch error of Exception in component tFileUnarchive_1 java.io.IOExcep

Ok, I undestood it should be corrected in Talend 5.
I hope this will be corrected on next versions.
Thanh.

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Downloads and Trials

Test drive Talend's enterprise products.

Downloads