Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
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)
17 Replies
Anonymous
Not applicable

Same here (on 4.2.3) - thanks for the post. I thought I'm going crazy.
I had it exported once and it worked while later exports keep erroring out. The difference was I was only selecting the Unix launcher...
_AnonymousUser
Specialist III
Specialist III

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

Thats all very nice and dandy but what do I do if I don't have TIS???
_AnonymousUser
Specialist III
Specialist III

Same problem on 5.0.2 under windows XP.
Using "All" for "Shell Launcher" option works too on this version, thanks!
Anonymous
Not applicable

Here's Every one's export functionality is working in one or the other way but it was not working in my system 0683p000009MPcz.png
Problem: I created a job and was working perfect but when i am exporting the same job main class is missing in folder. I followed the suggestions who all mentioned above {using "All" for Shell Launcher and by windows too} but still it is not working. I request to help and im new to talend.
I am using Talend 5.2.0 on windows 7 machine.
Thanks a Lot in Advance.
Regards
Naveen
Anonymous
Not applicable

Here's Every one's export functionality is working in one or the other way but it was not working in my system 0683p000009MPcz.png
Problem: I created a job and was working perfect but when i am exporting the same job main class is missing in folder. I followed the suggestions who all mentioned above {using "All" for Shell Launcher and by windows too} but still it is not working. I request to help and im new to talend.
I am using Talend 5.2.0 on windows 7 machine.
Thanks a Lot in Advance.
Regards
Naveen

Strange, not working for me too, i am using talend 5.4 on windows 7 , tried both way only windows and all.
Anonymous
Not applicable

Hi shripatel
This topic is a little old, for better following up your problem, I would suggest you to open a new topic for your problem with details.
Shong
Anonymous
Not applicable

hi
I am using Talend Big Data 6.2 tool and exporting job as BuildJob->Build Type: OSGI Bundle for ESB. Now when I am using java code to call this jar file, it is still showing error as : 
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:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at TestClassTalendJar.main(TestClassTalendJar.java:5)
Caused by: java.lang.ClassNotFoundException: routines.system.api.TalendJob
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 13 more
Please suggest me the way. We are running behind of time and not able to progress a single steps ahead.
Prakash
Anonymous
Not applicable

Hi  Prakash,
We have replied to your another topic: https://community.talend.com/t5/Design-and-Development/Talend-Job-export-and-execution-problem/td-p/....
Could you please take a look at it?
Best regards
Sabrina