One Star

[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. 
9 REPLIES
Community Manager

Re: [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. 

Talend generates a zip package while exporting the job script. The zip package should contains a lib direcotry and jobinfo properties file, it is not normal if it doesn't. 
Can you please give us more information about this issue? What's the configurations when you export the job script?
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

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

Hello,
I have the same problem when i create a autonomous Job. My job is working on my Windows 7 machine but not on my Windows 2008 server edition machine.
The error is the same (Exception in thread "main" java.lang.NoClassDefFoundError: routines/system/api/T
alendJob). For information, I am working with Talend 5.5.1.
Is there a solution?
Laurent
Moderator

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

Hi Laurent,
What's the JDK version installed on your Windows 2008 server edition 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] Exception in thread "main" java.lang.NoClassDefFoundError

Hello,
the java version on my Windows 2008 server edition machine is 1.7.0.60. (Fyi it's 1.7.0.40 on my Windows 7 machine).
Laurent.
Moderator

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

Hi,
Is oracle JDK 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] Exception in thread "main" java.lang.NoClassDefFoundError

Both Oracle JDK
Moderator

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

Hi,
Did you follow up document TalendHelpCenter:How to build Jobs to export your job as autonomous job? What's your configurations when you export the job script?
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] Exception in thread "main" java.lang.NoClassDefFoundError

hi,
I will look. I chosed (All: windows + unix) because on some forum i've seen that can soluce my problem for an former version of talend.
Laurent
Moderator

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

Hi,
Feel free to let me know if something happend.
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.