"Could not find or load main class" error when deploying a Web Service or Route onto Runtime

Overview

The option "Use an independent process to run subjob" on tRunJob causes a "Could not find or load main class" error when deploying a Web Service or a Route onto the Runtime, but the same Web Service or Route runs fine in Talend Studio. This article explains the issue and offers a solution.

 

Environment

This issue can occur in all versions of the Talend ESB product.

 

Symptoms/Description

Below is a sample of a Web Service provider Job containing a tRunJob component that calls a child Job and for which the ''Use an independent process to run subjob'' option is enabled.

 

untitled.png

 

If the Web Service provider Job is executed in Talend Studio, you can successfully call the Web Service. But if the Web Service is deployed onto the Runtime, you will get the following error when calling the Web Service:

org.apache.cxf.binding.soap.SoapFault: Child job returns 1. It doesn't terminate normally.
Error: Could not find or load main class esb_demo.childjob_0_1.childJob
	at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:84)

This problem also exists in a Route if it has a cTalendJob component that calls a data integration Job, and the data integration Job contains a tRunJob with the "Use an independent process to run subjob" option selected.

 

Resolution

The "Use an independent process to run subjob" option on tRunJob is not compatible with the Runtime. When this option is selected, the child Job will be executed as a separate application. It is a bundle installed on the Runtime after the Web Service or Route is deployed onto the Runtime, therefore it cannot find the executable class file for the child Job. To resolve this issue, disable the "Use an independent process to run subjob" option on the tRunJob component and re-deploy the Web Service or Route onto Runtime.

Related Jira Issues

TESB-10858 NoClassDefFound, ClassNotFoundException Error during deploying my WS into runtime_ESBSE, it call another job (helper) by tRunJob - Closed

Version history
Revision #:
6 of 6
Last update:
‎05-04-2017 10:01 PM
Updated by:
 
Labels (2)
Tags (1)