Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
amenardie
Contributor
Contributor

tFileCopy not deleting file source

Hello,

I have an issue with the tFileCopy component in several of my jobs. I am using this component after creating an xml file where all the processed data is stored.

I need to delete the file source and make a copy into 2 other directories, which are :

-directory "processed" when the tAdvancedFileOutputXML is ok

-directory "error" when the component is not

Here are a few screenshots to illustrate what i want, and what i did :

0695b00000lvM5FAAU.png

0695b00000lvM5KAAU.png

0695b00000lvM5PAAU.png

The last two screenshots show that i checked "delete file source", "create directory if doesn't exist", "Replace existing file".

The problem is that, locally when i start the job in Talend Open Studio, it's working fine, the xml file is created and the source file is deleted (with a copy created in the right directory).

But then when I export the job and install it on a server, starting it and processing a file, the job is working but the the file is not deleted.

It can't be a directory rights issue because we already have other jobs which are working fine on this server.

Do you have some ideas on what could be the problem here ?

If you want more details, i'd be glad to give it to you.

Thank you.

Labels (2)
4 Replies
anselmopeixoto
Partner - Creator III
Partner - Creator III

Hi @antoine menardie​ 

 

Since you're sure the problem is not directory rights and the "Fail on error" option is already checked on tFileCopy, I suggest you run the Job with Log4j at DEBUG level.

 

Perhaps the log you tell the reason why the component is not deleting the source file.

Anonymous
Not applicable

Hello,

For testing only, could you have a try to remove the file using tFileDelete instead of using 'remove the resource file' option on tFileCopy in next subjob, to check the user on your server who launch studio has the right to delete the file.

Best regards

Sabrina

amenardie
Contributor
Contributor
Author

Hello @Anselmo Peixoto​,

 

I tried to configure Log4j in this talend job but it is not working and I don't really know why as i tried to configure it on the other jobs which are running fine and it worked.

It seems like it stopped at the file reading.

I activated log4j for this job, and ran it in debug level.

0695b00000lw6uOAAQ.pngHere is my log4j template :

0695b00000lw6v2AAA.pngI attached to this message the log file generated by log4j.

Do you have any idea what could be the problem ?

 

@Xiaodi Shi​ thank you for your help. I tried the tFileDelete component but the file source isn't deleted.

I checked the rights for users on the directory, and it is the same as the others.

 

Kind regards

anselmopeixoto
Partner - Creator III
Partner - Creator III

Hi @antoine menardie​ 

 

I believe the ThresholdFilter level="info" on your log4j template has restricted the messages on the log to INFO level only.

 

Try changing this property to get DEBUG level messages on the log.