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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Error: Could not find or load main class, tRunJob - Use Dynamic Job

Hello all,
I am using TOS 6.0 Big Data open studio and Tomcat 7
In my job, I am using tRunJob component with
1. dynamic job checked
2. context job input: The subjob name which I want to run
3. Job input: Multi Select the list of the jobs
When I run the job from studio is running properly.
The error occurs when I build the Jobs as AXIS WebService (WAR), deploy it to Tomcat and trying to run the Job using
http://localhost:8080/JOBS/services/Main_Job?method=runJob&arg1=--context_param%20subJobName=subJobN...
with  error
Exception in component tRunJob_1
java.lang.RuntimeException: Child job returns 1. It doesn't terminate normally.
Error: Could not find or load main class myproject.main_job_0_1.SubJob
However in the exploded war the jars exists under WEB-INF/lib/*.jar
I know about the Limitation but the link for alternative solution doesn't work
Any idea how to solve it?
Labels (3)
5 Replies
Anonymous
Not applicable
Author

Hi,
The job should be Ok if you can execute it successfully in studio.
Have you checked out "Apply to children" option when you export your job as AXIS WebService (WAR)?
Best regards
Sabrina
Anonymous
Not applicable
Author

Yes I have checked "Apply to children" option.
Also in the documentation of tRunJob there is the following :
"Limitation

The Use dynamic job option of tRunJob allows the main Job to call the child Job dynamically at runtime.
However, this option does not work if the child Job had been exported with the Axis WebService (WAR) type, and been deployed to Tomcat as a web service.
For an alternative solution, see link for details."
but the link for alternative solution doesn't work
Anonymous
Not applicable
Author

Hi,
How many child jobs do you want to call at run time?
Have you already checked the jira issue also:  https://jira.talendforge.org/browse/TDI-21348
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi,
thank you for your reply.
In the component tRunJob in the Job list I have placed all the jobs I have designed (around 20 jobs)
and in the dynamic job I placed a parameter with the job name so it's one child-job every time according to the parameter.
I have checked the jira and also the documentation. As I understand something like this is not compatible.
Is there any alternative solution?
Anonymous
Not applicable
Author

Hi,
Feel free to create a workitem jira issue of DI project on Talend Bug Tracker.
Best regards
Sabrina