Unarchive file path error

Highlighted
Five Stars

Unarchive file path error

I have a job to check for the existence of a .tar file and then extract it to a folder and archive the file again to .zip

 

I have this java code to set the paths to the folders:

String os = System.getProperty("os.name").toLowerCase();  
//final java.util.Map globalMap = new java.util.HashMap();
if(os.indexOf("win") >= 0){

//	context.projPath="C:/bin/Batch_progs/IPTV/epg/";
	context.projPath="C:/bin/Batch_progs/IPTV/epg/";
	context.projBackup="C:/bin/Batch_progs/IPTV/epg/backup/";
	context.projExtract="C:/bin/Batch_progs/IPTV/epg/extraido/";
	
}

and it's working fine but if i change the path to these

String os = System.getProperty("os.name").toLowerCase();  
//final java.util.Map globalMap = new java.util.HashMap();
if(os.indexOf("win") >= 0){

//	context.projPath="C:/bin/Batch_progs/IPTV/epg/";
	context.projPath="C:/NHACVM/TVNAMON/EPG/";
	context.projBackup="C:/NHACVM/TVNAMON/EPG/backup/";
	context.projExtract="C:/NHACVM/TVNAMON/EPG/extraido/";
}

it's throwing the following error:
tFileUnarchive_2 error message java.io.IOException:The filename, directory name, or volume label syntax is incorrect
What can be causing this?

Thank you.

Employee

Re: Unarchive file path error

Hi,

 

    Did you check whether the directories are accessible from that machine? Also could you please show the job flow and component detail screenshots?

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

Five Stars

Re: Unarchive file path error

@nikhilthampi there i the job flow:

image.png

image.pngcheck if file exists: context.projPath+"CVMultimedia_"+TalendDate.getDate("yyyyMMdd")+".tar.gz"

image.pngarchive file: context.projPath+"CVMultimedia_"+TalendDate.getDate("yyyyMMdd")+".tar.gz"

I created the same folder structure in my local machine to test and its throwing the same error.

Employee

Re: Unarchive file path error

Hi,

 

   Could you please print the values you are trying to give to these components in a tjava and see whether the values are correct?

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

 

 

Five Stars

Re: Unarchive file path error

@nikhilthampi i'm new to talend so can you show where and how to do what you suggested me?

Employee

Re: Unarchive file path error

Hi,

 

   Please refer the below link to understand how to print the data to console.

 

https://community.talend.com/t5/Design-and-Development/Print-to-log-window/td-p/94145

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

Five Stars

Re: Unarchive file path error

@nikhilthampi i printed the values:

image.png

 

and the values are correct. The paths are correct too.

Employee

Re: Unarchive file path error

Hi,

 

    Could you please remove the three stars in your data?

 

    Please also verify the possible reasons from the below link.

 

https://stackoverflow.com/questions/131901/what-are-possible-reasons-for-java-io-ioexception-the-fil...

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

Five Stars

Re: Unarchive file path error

The stars are just strings concatenated. You can ignore them.

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 3

Read about some useful Context Variable ideas

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

Talend Studio Improvements for API Services

Take a look at the Talend Studio improvements for API Services

Watch Now