Error in Java code tStatCatcher? "scm cannot be resolved"

Highlighted
Six Stars

Error in Java code tStatCatcher? "scm cannot be resolved"

Hi all, 

I am trying to set up the logging for my job, and I'm using the tStatCatcher. 

However, when I run the job, I get a syntax error  "scm cannot be resolved" while I did not use the term 'scm' anywhere myself. 

After checking the Java code, it appears that when inserting the tStatCatcher, automatically this code is created that causes the problem: 

 

for (StatCatcherUtils.StatCatcherMessage scm : tStatCatcher_1.getMessages()) {
row5.pid = pid;
row5.root_pid = rootPid;
row5.father_pid = fatherPid;
row5.project = projectName;
row5.job = jobName;
row5.context = contextStr;
row5.origin = (scm.getOrigin()==null || scm.getOrigin().length()<1 ? null : scm.getOrigin());
row5.message = scm.getMessage();
row5.duration = scm.getDuration();
row5.moment = scm.getMoment();
row5.message_type = scm.getMessageType();
row5.job_version = scm.getJobVersion();
row5.job_repository_id = scm.getJobId();
row5.system_pid = scm.getSystemPid();

 

And the weird thing is, in other jobs that are set up similarly, this problem doesn't occur. 

What did I do wrong, or what did I miss here? And how could it be solved? 

 

I hope you can help me!


Accepted Solutions
Highlighted
Six Stars

Re: Error in Java code tStatCatcher? "scm cannot be resolved"

Hi,

 

No, I didn't do anything.. I just opened it again the next day and the issue disappeared.

It also seemed strange to me that a code generated by the program itself would give a problem.. but still.. would have been nice to know how to prevent this or to know how to really solve it.

 

View solution in original post


All Replies
Highlighted
Employee

Re: Error in Java code tStatCatcher? "scm cannot be resolved"

Can you try either of these:

1) Remove the tStatCatcher and see if it works

2) Rename the job

 

Can you put a screenshot of your job here?

Highlighted
Six Stars

Re: Error in Java code tStatCatcher? "scm cannot be resolved"

Without the logging route the job works, so the error comes really from that. 

Renaming did not help. 

I added a screenshot. 

Highlighted
Ten Stars

Re: Error in Java code tStatCatcher? "scm cannot be resolved"

Can you post the entire error message, please?

Highlighted
Six Stars

Re: Error in Java code tStatCatcher? "scm cannot be resolved"

Hi all,

 

Thanks for your replies, but the problem solved itself. Quite frustrating, because now I still don't know what was the problem, but anyway.

 

Highlighted
Moderator

Re: Error in Java code tStatCatcher? "scm cannot be resolved"

Hi,

How did you resolve your issue? Did you re-create a new job with same job design?

Best regards

Sabrina

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

Re: Error in Java code tStatCatcher? "scm cannot be resolved"

Hi,

 

No, I didn't do anything.. I just opened it again the next day and the issue disappeared.

It also seemed strange to me that a code generated by the program itself would give a problem.. but still.. would have been nice to know how to prevent this or to know how to really solve it.

 

View solution in original post

2019 GARTNER 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

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog