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: 
dpdfr_ag
Contributor
Contributor

[resolved] Error Could not find the main class

Hi,
I have exported a Job created with TIS 4.2.2|r63143.
When I deployed my Job inside my server and when I launch it ( with a cron tasks ) I have this error :
Exception in thread "main" java.lang.NoClassDefFoundError: routines/system/api/TalendJob
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Caused by: java.lang.ClassNotFoundException: routines.system.api.TalendJob
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 12 more
Could not find the main class: projet_albin.my_job.my_job. Program will exit.

That's very strange because when I make the same export with a TOS version, I have no problem when I execute my Job.
Some idea ?
Thanks.
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi all,
there is a bug in the 4.2.2 job's extraction !!
If you choose only Unix version, the classpath.jar is incorrect !!
To by pass the pb you can generate both (win + unix) then the classpath.jar generated will be ok !!!!
Regards,
etl_talend

View solution in original post

17 Replies
Anonymous
Not applicable

Hi albin
The job is not exported completely, some of class file are missing. To check if the job runs fine in a TIS studio and try to regenerate it again.
Best regards
Shong
dpdfr_ag
Contributor
Contributor
Author

Hi Shong,
Thanks for your answer.
My Job works perfectly inside TIS Studio.

I tried to export it a several time but the problem persits.
Anonymous
Not applicable

Hi alin
Ok, please report a support ticket and send us the job item, so that our support team can investigate it further.
Best regards
Shong
Anonymous
Not applicable

Hi all,
there is a bug in the 4.2.2 job's extraction !!
If you choose only Unix version, the classpath.jar is incorrect !!
To by pass the pb you can generate both (win + unix) then the classpath.jar generated will be ok !!!!
Regards,
etl_talend
dpdfr_ag
Contributor
Contributor
Author

I confirm.
I have export my Job with both (win + unix ) and my Job work fine now into my Unix server.
Thanks a lot for your answers.
Anonymous
Not applicable

Am trying to export a job but files are missing???
I tried to export it as UNIX project, Windows or Any but I still get the same issue!!!!
Is there a way to export only the files you need including java files?????????????
Thank you in advance,
Bujar
Anonymous
Not applicable

Hello,
It looks the bug is still present in the TOS version 4.2.3...
Is a patch planned in a near future?
benu
Contributor III
Contributor III

Still present in v4.2.3 r67267, and I'm REALLY glad I found this post - I was going crazy! Using "All" for "Shell Launcher" option solved the problem.
Anonymous
Not applicable

hi, i had the same problem and is a problem with the 4.2.2 job's extraction. I only had to changed the version. very good post.
tks