Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Getting error while executing job on UNIX.

Hi,
I build a job in my local windows machine. and I copied that folder in UNIX server but when I trying to run .sh file, I got following error.
WYCHT_FF_TO_WYCHT_FILING_LNDG_WR]$ sh WYCHT_FF_TO_WYCHT_FILING_LNDG_WR_run.sh
Exception in thread "main" java.lang.NoClassDefFoundError: routines.system.api.TalendJob
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:275)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:74)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:529)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:440)
at java.net.URLClassLoader.access$300(URLClassLoader.java:68)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1027)
at java.security.AccessController.doPrivileged(AccessController.java:310)
at java.net.URLClassLoader.findClass(URLClassLoader.java:418)
at java.lang.ClassLoader.loadClass(ClassLoader.java:660)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:346)
at java.lang.ClassLoader.loadClass(ClassLoader.java:626)
Caused by: java.lang.ClassNotFoundException: routines.system.api.TalendJob
at java.net.URLClassLoader.findClass(URLClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:660)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:346)
at java.lang.ClassLoader.loadClass(ClassLoader.java:626)
... 12 more
Could not find the main class: wycht_wr.wycht_ff_to_wycht_filing_lndg_wr_0_1.WYCHT_FF_TO_WYCHT_FILING_LNDG_WR. Program will exit.
Labels (2)
35 Replies
Anonymous
Not applicable
Author

Hi Sabrina,
We exported completely and executed successfully in Windows local machine.
We are facing the issue, while executing the jobs in LINUX machine ( another machine ).
Thanks !
Anonymous
Not applicable
Author

Hi,
Did you run your job successfully in studio? Is the .bat file working well in commandline?
Best regards
Sabrina
_AnonymousUser
Specialist III
Specialist III

Hi Sabrina,
Yes, we were able to run in studio.
.bat file is also working well in commandline
Thanks !
Anonymous
Not applicable
Author

Hi,
Yes, we were able to run in studio.
.bat file is also working well in commandline

The job and exported job script are OK. What is JDK on LINUX machine?
Best regards
Sabrina
_AnonymousUser
Specialist III
Specialist III

Hi Sabrina,
In order to execute Exported Talend Job in a Unix machine, should we have Talend installed in the same Unix Machine?
Regards,
Hemachandran.
Anonymous
Not applicable
Author

Hi Hemachandran,
You don't need talend to be installed on the unix machine to execute exported job. But, you need compatible java version on the machine.
Vaibhav
Anonymous
Not applicable
Author

Hi Hemachandran,
You don't need talend to be installed on the unix machine to execute exported job. But, you need compatible java version on the machine.
Vaibhav

Thanks Sanvaibhav.
Java 1.7 is installed in the Linux machine(64 bits). I'm getting the below error while executing the exported job in Linux: I tried with a simple job with tMsg_box alone. The same is working with windows .bat file.
Exception in thread "main" java.lang.NoClassDefFoundError: routines/system/api/TalendJob
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
Caused by: java.lang.ClassNotFoundException: routines.system.api.TalendJob
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        ... 13 more
Thanks,
Hemachandran
Anonymous
Not applicable
Author

Hi,
This is a problem related to the required library after export.... can you remove your msgbox component and replace it by tJava component and use
System.out.println("Hello Talend");
and check again?
vaibhav
Anonymous
Not applicable
Author

Still I'm getting the same error.
Regards,
Hemachandran
Anonymous
Not applicable
Author

Hi 
How do you move the job script file to Linux machine? Talend generate a zip package while exporting the job script, unzip the archive file and execute the batch file to ensure the export is completely and the job works fine. 
If you want to execute the job on another machine, you should move the zip package, and then unzip the zip package and execute it.
Best regards
Shong