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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Error: Could not find or load main class. when running a Talend Job

I have the same issue with our dev environment. I get error Error: Could not find or load main class. Take note, that it works in our pre-prod environment and setup is identical.
Things to note:
1. Talend is installed in linux machine with no spaces in directory path at all.
2. Talend is root user so it has access to all files.
3. if we contact support most likely it will send us through this forum.
Thanks,
David

Labels (2)
51 Replies
Anonymous
Not applicable
Author

Where do you get this error? On your studio or on the Jobserver?
If you have a support subscription you should use it!
Anonymous
Not applicable
Author

Hi,
Make sure your jdk environment is totally correct.(java -version classpath=.;%JAVA_HOME%\jre\lib\rt.jar;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar 0683p000009MA9p.png.
Does this issue appear when run a specific job or all jobs? or server not studio? Please give us more information about your current job situation.
Best regards
Sabrina
_AnonymousUser
Specialist III
Specialist III

I have the same issue with our dev environment. I get error "Error: Could not find or load main class."
I would like to schedule my job but this issue appears when running the exported job.
T need your help please.
Anonymous
Not applicable
Author

Same as asked previously by xdshi and jlolling, we need more information about your setup and environment.
Confirm you made the checks suggested by xdshi above.
what version of talend do you have? do you get it when running the job within the studio? have you exported all dependencies you needed?
Provide as much information as you can.
_AnonymousUser
Specialist III
Specialist III

Firt I confirm that i made the checks suggested by xdshi.
The version of talend is:
Version: 5.4.1
Build id: r111943-20131212-1133
I don't get this issue when running the job on the studio, it works very well. But after exporting the job and all the dependencies i tried to run the batch file but it doesn't work.


Microsoft Windows
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\hh>java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
C:\Users\hh>F:\Tranfert\transfert_0.1\transfert_0.1\transfert\transfert_run.bat
C:\Users\hh>F:
F:\>cd F:\Tranfert\transfert_0.1\transfert_0.1\transfert\
F:\Tranfert\transfert_0.1\transfert_0.1\transfert>java -Xms256M -Xmx1024M -cp cl
asspath.jar; optimbo.transfert_0_1.transfert --context=Default
Error: Could not find or load main class optimbo.transfert_0_1.transfert
Anonymous
Not applicable
Author

Hi,
So far, there is no support for Java 8 in talend
Please have a look at KB article about TalendHelpCenter:https://help.talend.com/display/KB/Java+8+Support.
Could you please downgrade your jdk 1.8 into jdk 1.7 or 1.6 to see if this issue repro?
Best regards
Sabrina
_AnonymousUser
Specialist III
Specialist III

Hi,
I downgraded java 1.8 into 1.6 anad i got this error:



Microsoft Windows
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\niba>F:\Tranfert\Direct_debit_transfert_Copy_0.1\Direct_debit_transfert
_Copy_0.1\Direct_debit_transfert_Copy\Direct_debit_transfert_Copy_run.bat
C:\Users\niba>F:
F:\>cd F:\Tranfert\Direct_debit_transfert_Copy_0.1\Direct_debit_transfert_Copy_0
.1\Direct_debit_transfert_Copy\
F:\Tranfert\Direct_debit_transfert_Copy_0.1\Direct_debit_transfert_Copy_0.1\Dire
ct_debit_transfert_Copy>java -Xms256M -Xmx1024M -cp classpath.jar; optimbo.direc
t_debit_transfert_copy_0_1.Direct_debit_transfert_Copy --context=Default
Exception in thread "main" java.lang.NoClassDefFoundError: optimbo/direct_debit_
transfert_copy_0_1/Direct_debit_transfert_Copy
Caused by: java.lang.ClassNotFoundException: optimbo.direct_debit_transfert_copy
_0_1.Direct_debit_transfert_Copy
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)
Could not find the main class: optimbo.direct_debit_transfert_copy_0_1.Direct_de
bit_transfert_Copy. Program will exit.
F:\Tranfert\Direct_debit_transfert_Copy_0.1\Direct_debit_transfert_Copy_0.1\Direct_debit_transfert_Copy>
Anonymous
Not applicable
Author

Hi,
Make sure your jdk version is jdk 1.6
C:\Users\hh>java -version
java version "1.6"
Is there any extra space or illegal character in your installation path? Have you already checked online document TalendHelpCenter:Installation+requirements to set your Environment variable?
Best regards
Sabrina
Anonymous
Not applicable
Author

hi i have the same problem , and i run the command that you suggested 
# java -version  classpath=.;%JAVA_HOME%\jre\lib\rt.jar;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) Client VM (build 23.1-b03, mixed mode, sharing)
bash: fg: %JAVA_HOME%jrelibrt.jar: no such job
bash: fg: %JAVA_HOME%libdt.jar: no such job
bash: fg: %JAVA_HOME%libtools.jar: no such job
You have new mail in /var/spool/mail/root

what i need to do in my case?
thanks a lot,
Shani.