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

 


All Replies
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?

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. 

Ten Stars

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

Can you post the entire error message, please?

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.

 

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

 

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

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

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch