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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Could not find the context PROD on a job deployed as a webservice

HI to everyone,
I've working on TOS 5.4.1 for more than a year, and before that, I've been developping in J2EE environnements for more that 5 years.
I've been working on a job that works fine when executed inside Talend, whatever the context. So I've built it as a webservice and put in on a tomcat7 on a linux server to test it, with success.
Now, I'm moving to Production step, and when deploying, no problem. But when executing, in the log, I got : 
-  an error message : "COuld not find the context PROD"
- then the job execute the beggining of what it's supposed to do (starting with a Sysout in a tjava to print out the parameters received by the webservice), 
- and then, the first componant to touch one of my context variables, it throws a NullPointerException as it doesn't such variable.

In the job, I got several groups of contexts (for each DB or FTP), and I got 3 contexts : LOCAL (talend), DEV (integration server) and PROD (production server).

I built the job choosing PROD environnement obviously. And in the war extracted, I found inside "apache-tomcat/webapps/myJob_0.1/WEB-INF/classes/ipad/myjob_0_1/contexts" my 3 contexts.

i don't understand what's happenning, what am I missing, and why does this bug happens in production and not in Integration server with DEV context.

If i can bring you more details that will help me resolving this issue, please ask me, I'll be quick.

Thanks a lot for any help.
0683p000009MGMt.jpg0683p000009MHCj.jpg

Labels (2)
7 Replies
Anonymous
Not applicable
Author

Hi,

Do you have child jobs in your main job ? Can you put a screenshot of your job ?

Thanks,
Arnaud
Anonymous
Not applicable
Author

Hi, here are some screenshot of my main job, which indeed calls child jobs.
0683p000009MH89.jpg 0683p000009MH3L.jpg
Anonymous
Not applicable
Author

In your main job, you have child job.

When the main job running with the PROD context, the context is transmit. The fail is when a child job don't have the parent job context.

Verify if PROD context exist in all your child job. If the context don't exist in a child job, you have an error because the job don't find it as if you don't use context properties.

To avoid problems, always use same kind of context in all jobs like DEV, STAGING, PROD.
Anonymous
Not applicable
Author

Thanks for your answer.
I have the same 3 context LOCAL, DEV, PROD in the main job and in all child jobs, with the exact same name, the only thing that's different seems to be the order of the contexts...
I don't know if that could be the cause.
Anonymous
Not applicable
Author

I just saw your screen with Ajout_doc properties. On the select context, choose default context (DEV i think) for all tRunJob component and check 'Transmit context'.

Can you screen your Ajout_doc job please ?
Anonymous
Not applicable
Author

There it is.
I tried to export another job, also with child job and the same 3 contexts, and got the same problem.
0683p000009MH84.jpg
Anonymous
Not applicable
Author

Can you verify if all parent context properties are in child context properties ?