Exception in component tFileArchive_1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1

Eight Stars

Exception in component tFileArchive_1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1

When trying to archive the csv file to zip file , got below error . Need help on this 

 

Exception in component tFileArchive_1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1


Accepted Solutions
Nine Stars

Re: Exception in component tFileArchive_1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1

Hi @Karuetl,

Thanks for the screenshot,

Try by removing filename in the directory...specify only the directory where the file which is to be archived stored

File mask is specifying one certain file or list of files under an extension(for eg. excel files or text files etc) and when you specify all files.. all the files in the directory will be archived.

Pls reach out to the community,if necessary.

Thanks,

Ankit


All Replies
Forteen Stars

Re: Exception in component tFileArchive_1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1

@Karuetl,can you the component design?

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Nine Stars

Re: Exception in component tFileArchive_1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1

Hi @Karuetl,

Pls check the directory and destination where you want to store the archive file.

Also do check the filemask.

i m sure you might have checked all these. 

Pls do share the screenshot of the component which help the Community to clear the issue with a detailed explaination.

Thanks,

Ankit.

 

Highlighted
Eight Stars

Re: Exception in component tFileArchive_1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1

context.filename = abcd-2019.01.08.14.11.11.csv
archive file  = abcd-2019.01.08.14.11.11.csv.zip

 

 

1.PNG2.PNG

Seven Stars

Re: Exception in component tFileArchive_1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1

You haven't specified a filemask or "all files".

Eight Stars

Re: Exception in component tFileArchive_1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1

I even tried with All Files also File mask too , same error 

Nine Stars

Re: Exception in component tFileArchive_1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1

Hi @Karuetl,

Thanks for the screenshot,

Try by removing filename in the directory...specify only the directory where the file which is to be archived stored

File mask is specifying one certain file or list of files under an extension(for eg. excel files or text files etc) and when you specify all files.. all the files in the directory will be archived.

Pls reach out to the community,if necessary.

Thanks,

Ankit

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

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog