One Star

[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.
1 ACCEPTED SOLUTION

Accepted Solutions
One Star

Re: [resolved] Getting error while executing job on UNIX.

Hi,
Job is running now I forget to copy 'lib' folder into UNIX machine.

Thank you,
Kiran
35 REPLIES
Moderator

Re: [resolved] Getting error while executing job on UNIX.

Hi,
The error message indicates the required jars are missing, the job script might be not exported completely.Did you do right-click on the job, select 'Setup routines dependencies' option to add all system routines?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: [resolved] Getting error while executing job on UNIX.

Hi,
This error java.lang.NoClassDefFoundError: routines.system.api.TalendJob is related to java classes.
Could you run job on windows machine?
What is JDK on unix machine?
I think you are using routine in your jobs, have you enabled the dependency on routine for your jobs?
While exporting have you checked the dependency checkbox?
Vaibhav
One Star

Re: [resolved] Getting error while executing job on UNIX.

Hi Sabrina,
All options are disabled, When we choose 'Setup routines dependencies'.
One Star

Re: [resolved] Getting error while executing job on UNIX.

Hi Vaibhav,
Yes job is running on my local Windows Machine.
Java version on UNIX server is 1.6 (64-bit).
Moderator

Re: [resolved] Getting error while executing job on UNIX.

Hi,
Could you tell us the build version you're using? Did you follow up document TalendHelpCenter:How to build Jobs to export your job script? Did you use "All" for "Shell Launcher" option when export your job?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Getting error while executing job on UNIX.

Hi,
Job is running now I forget to copy 'lib' folder into UNIX machine.

Thank you,
Kiran
Moderator

Re: [resolved] Getting error while executing job on UNIX.

Hi,
Thanks for your feedback. Could you please mark this topic as "Resolved"?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Getting error while executing job on UNIX.

Kiran, Sabrina
We are encountering the same issue, Could you please explain us more in detail about the lib folder and how did you resolve this issue ???
Thanks!
Moderator

Re: [resolved] Getting error while executing job on UNIX.

Hi ajosephraj,
Did export your job script completely? Did you job run successfully in your local machine? Do you want to run your job out of talend studio on another server machine?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Getting error while executing job on UNIX.

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 !
Moderator

Re: [resolved] Getting error while executing job on UNIX.

Hi,
Did you run your job successfully in studio? Is the .bat file working well in commandline?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Getting error while executing job on UNIX.

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

Re: [resolved] Getting error while executing job on UNIX.

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
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Getting error while executing job on UNIX.

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.
Four Stars

Re: [resolved] Getting error while executing job on UNIX.

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
One Star

Re: [resolved] Getting error while executing job on UNIX.

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
Four Stars

Re: [resolved] Getting error while executing job on UNIX.

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
One Star

Re: [resolved] Getting error while executing job on UNIX.

Still I'm getting the same error.
Regards,
Hemachandran
Community Manager

Re: [resolved] Getting error while executing job on UNIX.

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
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] Getting error while executing job on UNIX.

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

Hi Shong,
I did the same way as you have mentioned.
Job is running fine in windows. But not in Linux.
Regards,
Hemachandran
Moderator

Re: [resolved] Getting error while executing job on UNIX.

Hi,
java 1.7 is installed in the Linux machine(64 bits).

Is it Oralce JDK  1.7  or Open JDK?

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Getting error while executing job on UNIX.

Open JDK is installed in Linux
Moderator

Re: [resolved] Getting error while executing job on UNIX.

Hi,

OpenJDK is not supported by Talend, it requires Oralce JDK 1.6 or higher. Some jobs may work with OpenJDK, but it is not certified.

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Community Manager

Re: [resolved] Getting error while executing job on UNIX.

Hi
I am not able to reproduce this issue, as xdshi said, OpenJDK is not supported by Talend, try to install Oracle JDK and test it again.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Moderator

Re: [resolved] Getting error while executing job on UNIX.

Hi,
Is there any update for your issue?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Getting error while executing job on UNIX.

Hi,
Is there any update for your issue?
Best regards
Sabrina

Hi Sabrina,
I will check and let you know. I'm installing Oracle JDK now.
Regards,
Hemachandran
Moderator

Re: [resolved] Getting error while executing job on UNIX.

Hi,
Thanks for your quick reponse. Feel free to post your issue on forum.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Getting error while executing job on UNIX.

Hi Sabrina / Shong,
Whether jdk-7u65-linux-x64.tar.gz from the oracle site http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html will help us resolve this issue in Linux 64 bit machine ? Please suggest.
Thanks!
Moderator

Re: [resolved] Getting error while executing job on UNIX.

Hi,
According to document TalendHelpCenter:Compatible Platforms, you should install Oracle Java 7 JDK in your  Linux 64 bit machine.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.