Some libraries are deleted when a Job is executed

Symptoms

You may get the following error when trying to execute a task in Job Conductor:

Exception in thread "main" java.lang.NoClassDefFoundError

This is because the required Job libraries are missing. The following are two possible causes of this error:

  • The Job script is not exported completely.
  • The Job script is exported completely and deployed to the Job Server correctly. The Job works fine the first time, but the Job fails the second or subsequent time. Some required libraries are deleted.

 

Procedure

For the first cause

Re-generate the Job script and redeploy it to the Job Server.

 

For the second cause

There have been many Jobs deployed to the Job Server. There is a property in the Job Server to set the maximum number of cached libraries to keep. If the total number of libraries exceeds this value, some of the libraries will be deleted. To increase the value of this property to prevent this problem, follow these steps:

  1. Go to Job Server installation dir/conf/, open the TalendJobServer.properties file, and edit the following property:

    org.talend.remote.jobserver.commons.config.JobServerConfiguration.MAX_OLD_LIBS=300

    Change the property to a bigger value, for example:

    org.talend.remote.jobserver.commons.config.JobServerConfiguration.MAX_OLD_LIBS=350
  2. Save the file and restart Job Server.

  3. In the Job Conductor, regenerate the task and redeploy it to the Job Server.

Version history
Revision #:
3 of 3
Last update:
‎05-05-2017 02:38 PM
Updated by:
 
Labels (1)
Contributors