Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Jj5
Contributor III
Contributor III

[resolved] Exception in thread "main" java.lang.NoClassDefFoundError

Resolved: Talend isn't creating a folder that contains the lib directory and the jobinfo properties. I had to put them in the directory manually, but it works now. 
I'm trying to build a Standalone job in Talend. 
When I run the job in TOS it runs fine. When I build the job and run it on my machine, it runs without error. However, when I try to run the job on another machine I get the following error:
C:\universe\bin\Talend\LenderJob>java -Xms256M -Xmx1024M -cp ../lib/commons-la
ng-2.4.jar;../lib/dom4j-1.6.1.jar;../lib/external_sort.jar;../lib/jakarta-oro-2.
0.8.jar;../lib/talendcsv.jar;../lib/talend_file_enhanced_20070724.jar;../lib/sys
temRoutines.jar;../lib/userRoutines.jar;.;lenderjob_0_3.jar; lender.lenderjob_0_3.LenderJob --context=Default
Exception in thread "main" java.lang.NoClassDefFoundError: routines/system/api/T
alendJob
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: routines.system.api.TalendJob
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 13 more

I have made sure that Java is installed on the other machines and that the path is set correctly. 
It works on my Windows 7 machine, but it isn't working on the Windows 2008 server edition machine. 
Labels (3)
12 Replies
Anonymous
Not applicable

Start from the beginning in java when we using some function which belong to some class of jar and we do not have that in our running environment this error happens.

 

Now when come to talend job which is made in java so this error(which by the way your own fault) happen as when we created different type of jobs like on using excel file to map in mysql db, one using a mysql(any db) and joining it with excel file data to map in mysql(any db) will have different jar file requirement.Means not all talend jobs are using same jar file of lib.

 

So, check job lib folder jar files if they already exists in global lib folder(of talend) in external project of your.Like in my case

talend_Jobs

  /Students

 /Teachers

/lib

/jobInfo.properties 

 

I added Schools job here which using some jar file which are not already there in /lib so I added jar files from Schools job  /lib to global /lib of talend_Jobs

vivek_varanasi
Partner - Contributor II
Partner - Contributor II

5f71d9a31484f20001b5e6ae/26.5: Step 70f41426-8c68-45d9-81b0-8b4febe86251 failed with code -1 and error Job stopped with errors or unable to run. Exception in thread "main" java.lang.ExceptionInInitializerError

 

This is working fine in DEV and after promoting to QA or PROD then jobs failed with this reason. Any idea?

 

Java is good.

Context params are good.

Job is promoted using promotion option in TMC.

Anonymous
Not applicable

Hello,

Which Talend Release is in use? Are you getting this issue when execute some jobs in studio?

Best regards

Sabrina