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

Seven 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
Highlighted
Thirteen Stars

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

@Karuetl,can you the component design?

Manohar B
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.

 

Seven 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

Six 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".

Seven 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

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

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