Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Wawee
Contributor
Contributor

How to retain edited .java file of a Talend job?

Talend Cloud Real-Time Big Data Platform version 7.3.1

 

Tried editing the Talend job's java code in the following location:

<TalendInstallationDirectory>\workspace\<ProjectName>\poms\jobs\process\<JobName>\src\main\java\<project_name>\<jobname>\<jobname>.java

 

The purpose is to try to resolve the following Java error during Talend job execution:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/logging/log4j/LogManager

 

The following line of code was added:

import org.apache.logging.log4j.LogManager;

 

After re-executing the Talend job, the added line of code is automatically being deleted. How do I enforce Talend application to retain the modified code in <jobname>.java file?

 

Note: I have already tried the following.

  1. Added tLibraryLoad component; but this is not the recommended solution since exporting and importing the Talend job to others' similar Talend setup does not have any issue on the NoClassDefFoundError
  2. Explicitly added/installed the module/Jar file in the routine code's library.
  3. Explicitly added the Jar file in the Package Explorer of the project's Maven Dependencies
  4. Re-ordered build path to move Maven Dependencies on top.
  5. Lastly, even re-extrated/re-installed a new & fresh Talend application; but still encountering the same Java error that Talend cannot locate the class path in the specified jar file.
  6. Modified the project's java code but it is automatically being removed; so posted this topic for question.
Labels (5)
4 Replies
gjeremy1617088143

Hi maybe you could use :

File --> project Settings --> Maven

and you will see a window where you can force the synchronization of the poms.

and in filter : label=your job name

Send me Love and Kudos

gjeremy1617088143

else maybe this topic :

https://community.talend.com/s/article/Exception-in-thread-main-java-lang-NoClassDefFoundError-UV6Eg

gjeremy1617088143

else use tLoadLibrary component and load the log4j jar with it

Wawee
Contributor
Contributor
Author

Thanks. I tried the 2 suggestions; but still the same issue.