Four Stars

tFileCopy logging questions

Hi everyone,

I am new to Talend and I'm struggeling with the setup of the following flow:

I am copying files and logging this action with (iterative) tFileList ---> tFileCopy ---> tFlowToIterate ---> tIterateToFlow ---> tFileOutputDelimited


I have 2 questions:

1. It feels unnatural to use tFlowToIterate ---> tIterateToFlow for defining values to log with tFileOutputDelimited. Is there a better way of doing this?

2. I have set contexts of the Directory-type (with no "", I use the browse button to pick the folder), but when I use these in the tFileList directory field and the tFileCopy directory field (context.dir1), I get error "dir1 cannot be resolved to a variable". What could be causing this?

Six Stars

Re: tFileCopy logging questions

Can you provide a screenshot of your job + the config of the file components?

What exactly are you trying to log?


Four Stars

Re: tFileCopy logging questions

I want to log to a local file: which file was moved, at what time, from where, to where.

File components and context definitions + errors below. When I replace the context attributes with hard coded file paths "S:/etc." all files are moved correctly.








Six Stars

Re: tFileCopy logging questions

Try changing data type of your context variables from Directory to String.

Four Stars

Re: tFileCopy logging questions

Changing to string (with "") results in the same error.


Could it be related to JDK version (JDK with Java 8.0.910.15)?

Six Stars

Re: tFileCopy logging questions

That is a possibility.  Can you open the 'code' tab of your job and find the compilation error? That may point you in the right direction.


Re: tFileCopy logging questions


Auke wrote:

Changing to string (with "") results in the same error.


Could it be related to JDK version (JDK with Java 8.0.910.15)?

Have you ever executed your job successfully in your current studio with JDK with Java 8.0.910.15? On which talend build version you are using?

Best regards


Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: tFileCopy logging questions

Error at the red context.CMPverd: CMPverd cannot be resolved or is not a field 

The other contexts generate identical errors.


There are also some warnings about multiple markers, about type safety and about the static method convertToJsonText.  Are those relevant for my issue?


				ok_Hash.put("tFileList_3", false);
				start_Hash.put("tFileList_3", System.currentTimeMillis());

				currentComponent = "tFileList_3";

				int tos_count_tFileList_3 = 0;

				class BytesLimit65535_tFileList_3 {
					public void limitLog4jByte() throws Exception {


				new BytesLimit65535_tFileList_3().limitLog4jByte();

				String directory_tFileList_3 = context.CMPverd;
				final java.util.List<String> maskList_tFileList_3 = new java.util.ArrayList<String>();
				final java.util.List<java.util.regex.Pattern> patternList_tFileList_3 = new java.util.ArrayList<java.util.regex.Pattern>();
				for (final String filemask_tFileList_3 : maskList_tFileList_3) {
					String filemask_compile_tFileList_3 = filemask_tFileList_3;

					filemask_compile_tFileList_3 = org.apache.oro.text.GlobCompiler

					java.util.regex.Pattern fileNamePattern_tFileList_3 = java.util.regex.Pattern
				int NB_FILEtFileList_3 = 0;

				final boolean case_sensitive_tFileList_3 = true;
				final java.util.List<> list_tFileList_3 = new java.util.ArrayList<>();
				final java.util.Set<String> filePath_tFileList_3 = new java.util.HashSet<String>(); file_tFileList_3 = new

				file_tFileList_3.listFiles(new {



Four Stars

Re: tFileCopy logging questions

Hi Sabrina, when I replace te contexts with hard coded directory paths, the job runs fine.

With contexts containing the directories however, it always fails.

I'm on TOS version