Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Alpha549
Creator II
Creator II

Context not updated after editing Default.properties context file

Hello everyone,

When I build a job, I can run it lauching the job_run.bat file and it works. This job use Default.properties context file.

However, I noticed that when I update Default.properties file, the context variable is not updated in the job (I print it using System.out.println)...

I only have this problem on Windows. It works fine on Linux when I edit context properties file.

Did someone already have this problem ?

Labels (2)
1 Solution

Accepted Solutions
Alpha549
Creator II
Creator II
Author

@Shicong Hong​ 

Something caught my attention on you screenshot. I realised that all your libs were in your command line.

 

In my Studio Window menu, preferences, Talend, Export/import I had this :

 

0695b00000RiKbDAAV.png 

 

I unchecked add classpath jar.... and then rebuild my job.

Now it works... When I modify a value in my context file, and run the job again, the value changes !

View solution in original post

8 Replies
Anonymous
Not applicable

@Alpha549 Alpha549​ , what content you have modified? Can you describe the steps that helps us to reproduce the problem?

 

Regards

Shong

Alpha549
Creator II
Creator II
Author

Hello @Shicong Hong​ 

 

Here is my context in the Studio :

 

0695b00000RiIslAAF.png 

Here is the value :

 

0695b00000RiItAAAV.png 

I copied the value from here in the file explorer :

 

0695b00000RiIv1AAF.png 

I build the job, and set the DEV context to be used :

 

0695b00000RiIucAAF.png 

I extract the zip :

 

0695b00000RiIvkAAF.png 

Here I can see my context files :

 

0695b00000RiIvfAAF.png 

In the DEV.properties file I can see :

 

0695b00000RiIw4AAF.png 

My "C:\TJOB" in the Studio became "C\:\\TJOB" here

 

Let's run bat file :

 

0695b00000RiIyUAAV.png 

0695b00000RiIy6AAF.png

Alpha549
Creator II
Creator II
Author

END OF THE PREVIOUS MESSAGE

@Shicong Hong​ 

 

Here we can see the loaded value of our context variable. Everything goes like expected.... Now let's edit this value in the DEV.properties file... :

 

0695b00000RiIzNAAV.png 

 

When we run the job again, we can see that the value is not updated. It seems that it previously displayed value was the on defined in the job, and not the one in the file... :

 

0695b00000RiIzrAAF.png 

 

I don't know why this problem happens, but it works well on Linux when I edit context properties file.

Anonymous
Not applicable

@Alpha549 Alpha549​ Which version of studio are you using? I made a testing with v8.0.1 on windows and it works, see below:

0695b00000RiJudAAF.png 

My job is very simple, I use a tJava to print the value of context variable.

System.out.println(context.name);

0695b00000RiJuxAAF.png 

Regards

Shong

Alpha549
Creator II
Creator II
Author

@Shicong Hong​ 

Something caught my attention on you screenshot. I realised that all your libs were in your command line.

 

In my Studio Window menu, preferences, Talend, Export/import I had this :

 

0695b00000RiKbDAAV.png 

 

I unchecked add classpath jar.... and then rebuild my job.

Now it works... When I modify a value in my context file, and run the job again, the value changes !

Anonymous
Not applicable

ah, this checkbox is unchecked by default. I don't know why this option will cause this issue. Maybe it is a bug. I'm going to raise a ticket to our R&D team.

 

 

Alpha549
Creator II
Creator II
Author

Thank you again for your help @Shicong Hong​ . If you didn't show me your command line, I wouldn't see that it was a classpath problem !

Anonymous
Not applicable

@Alpha549 Alpha549​ here is the jira issue, you can watch the issue and will be notified once the status changes.