java.lang.NullPointerException when generating a Job

Overview

You have a generation problem in the Talend Administration Center (TAC) even if your Job runs successfully in the Studio.

The following error is displayed:

java.lang.NullPointerException
 at org.talend.designer.runprocess.java.JavaProcessorUtilities.sortClasspath(JavaProcessorUtilities

Environment

This article applies to all versions of Talend Studio.


Symptoms

Your Job runs well in the Studio, but you cannot generate it in the TAC. You get the following Java error:

java.lang.NullPointerException
 at org.talend.designer.runprocess.java.JavaProcessorUtilities.sortClasspath(JavaProcessorUtilities)
 at org.talend.designer.runprocess.java.JavaProcessorUtilities.computeLibrariesPath(JavaProcessorUtilities...)
 at org.talend.designer.runprocess.DefaultRunProcessService.updateLibraries(DefaultRunProcessService...)
 at org.talend.designer.runprocess.RunProcessService.updateLibraries(RunProcessService...)
 at org.talend.designer.runprocess.ProcessorUtilities.generateBuildInfo(ProcessorUtilities...)
 at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities...)
 at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities...)
 at org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities..)
 at org.talend.repository.ui.wizards.exportjob.scriptsmanager.JobScriptsManager.generateJobFiles(JobScriptsManager...)
 at org.talend.repository.ui.wizards.exportjob.scriptsmanager.JobScriptsManager.generateJobFiles(JobScriptsManager...)
 at org.talend.repository.ui.wizards.exportjob.scriptsmanager.JobJavaScriptsManager.getExportResources(JobJavaScriptsManager...)
 at org.talend.commandline.util.JobHandler.export(JobHandler...)
 at org.talend.commandline.command.CommandProcessor.doExportJob(CommandProcessor...)
 at org.talend.commandline.command.CommandProcessor.exportJob(CommandProcessor...)
 at org.talend.commandline.command.CommandProcessorSwitch.caseExportJobCommand(CommandProcessorSwitch.java:94)
 at org.talend.commandline.client.util.CommandAbstractSwitch.doSwitch(CommandAbstractSwitch.java:66)
 at org.talend.commandline.command.CommandConsumer.executeCommand(CommandConsumer.java:57)
 at org.talend.commandline.command.CommandConsumer.execute(CommandConsumer.java:35)
 at org.talend.commandline.mode.ServerCommandLine$CommmandConsumerRunnable.run(ServerCommandLine...)
 at java.lang.Thread.run(Unknown Source)

Resolution

Try to export the Job as a Jobscript from the Studio to make sure the export is working.

If the Job has custom components:

  1. Check if those custom components are specified in the TAC under CommandLine, on the Configuration page.
  2. Check that all libraries needed are in the /lib/java directory. If they are not, add the missing ones.
  3. Regenerate the task.
Version history
Revision #:
3 of 3
Last update:
‎06-16-2017 10:46 AM
Updated by:
 
Labels (1)