Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
welshsteve
Creator
Creator

tRESTClient component not accepting context variables

I have a job which was working perfectly fine yesterday. All of a sudden today, with no changes made by myself or my colleagues, the job in question is failing on a tRESTClient component. Getting a NullPointerException error.

 

[ERROR] 11:28:31 org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean- java.lang.NullPointerException : null

 

I am using context parameters for the URL, username and password.

 

If I replace the context parameteres with actual text values, the job works. So it is definitely the tRESTClient component not accepting the context parameters that is the issue.

 

As I have already said, this job was working fine yesterday and nothing has been changed.

Another job we have which is very similar has the tRESTCLient compnent set up exactly the same as this one (except for the Relative Path API call) is wrking perfectly fine and accepting the context parameters.

 

I just do not understand why Talend Studio does this. It is quite a regular occurence where jobs just stop working. It's as though job store "bad data" passed to them (for example if a job gets run by mistake and is abandoned).

Does anybody know why the tRESTClient component would stop accepting context parameters?

 

The error is not very useful at all as it is not telling me which value in the component is not receiving any info.

 

Thanks

Steve

 

0695b00000hrbYmAAI.png

Labels (2)
1 Solution

Accepted Solutions
welshsteve
Creator
Creator
Author

Hi @Shicong Hong​ 

 

Bizarely, I have jjst changed the name of the context variables slightly, and now it works.

That is just plain odd, and definitely points to an issue with how the jobs are executed.

 

View solution in original post

4 Replies
Anonymous
Not applicable

the value of context variables are loaded dynamically in the job or you define fixed value in Context view? For testing, print the value of context variables before it is used to check if the value is null.

welshsteve
Creator
Creator
Author

Hi @Shicong Hong​ 

The job is not loading the context variables into the job.

Why would this be?

As I have said, this job worked perfectly fine yesterday and nothing has changed. Why would it suddenly stop loading the context variables into the job?

Thanks

Steve

welshsteve
Creator
Creator
Author

Hi @Shicong Hong​ 

 

Bizarely, I have jjst changed the name of the context variables slightly, and now it works.

That is just plain odd, and definitely points to an issue with how the jobs are executed.

 

jlolling
Creator III
Creator III

We use the tRESTClient with context variables and have no problems at all.

Please check in the Context view if you context variables have types. I had sometimes the issue the context variables are damaged.