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

 

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 

Eight 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

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch