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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
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

Hi Philippe,
Are you using JDK 1.8? For version 6.2, have you already checked documents about:TalendHelpCenter:Compatible+Java+environments and TalendHelpCenter:Compatible+Operating+Systems?
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi,
I have Jave 1.8 Rev 77, and have just update to Rev 91. I'll tell you if this solves my problems.
I am with Windows 7 64bits, so I should be covered from this side.
Best regards,
Philippe.
Anonymous
Not applicable
Author

Hi  Philippe,
Let us know if it solve your problem.
In addition, is there any more error message?  Which is located in /workspace/.metadata/.log
Best regards
Sabrina
taka1
Partner - Contributor III
Partner - Contributor III

Hi,
I have run into the similar problem with the Error of "Could not find or load main class" to run a test job in the run job tab. The job contains a tJava component to call System.out.println("Test").
My environment is as follows:
- Talend Studio 6.1.1
- Java 1.8.0_77
- CentOS 6.7

The following warning message was shown in /opt/Talend-6.1.1/studio/workspace/.metadata/.log:
WARN  org.talend.commons.exception.CommonExceptionHandler  - org.eclipse.core.runtime.CoreException:
Parent of resource: /opt/Talend-6.1.1/studio/workspace/.Java/src/main/java/routines/DataOperation.java is marked as read-only.
...

I have installed the Talend Studio as root on CentOS but attempted to run jobs as a non-root user.
In this case, changing the file permission to run "chown -R talend:talend workspace/.Java" has resolved the problem.
Thank you,
Anonymous
Not applicable
Author

Hi,
I have installed the Talend Studio as root on CentOS but attempted to run jobs as a non-root user.
In this case, changing the file permission to run "chown -R talend:talend workspace/.Java" has resolved the problem.

Thanks for sharing your solution with us.
let us know if there is any further help we can give.
Best regards
Sabrina
Anonymous
Not applicable
Author

I ran into the same problem because of the space in my installation path "C:\Program Files\...".
Will this bug ever be fixed someday?
Anonymous
Not applicable
Author

Hi,
because of the space in my installation path "C:\Program Files\...".

Actually, it's not a bug.
It is recommended to avoid spaces and long names in the target installation directory path when you install talend studio in your machine.
Here is a online document about:TalendHelpCenter?Downloading+and+installing+Talend+Studio
Best regards
Sabrina
Anonymous
Not applicable
Author

Hello,
I am getting this error message too. Could someone please help me?
I downloaded  Talend-Studio-20160704_1411-V6.2.1.zip, unzipped it to  /Users/ericbelfortmattos/Desktop/Talend/Talend-Studio-20160704_1411-V6.2.1 and tried running running the Talend Studio by double-clicking Talend-Studio-macosx-cocoa.app on Finder. That did not work. I got an error message that says " The Talend-Studio-macosx-cocoa executable launcher was unable to locate its   companion shared library.", so I right clicked Talend-Studio-macosx-cocoa.app and chose "Show Package Contents", found the executable file "Talend-Studio-macosx-cocoa" under Contents\MacOS and double-clicked it. This brought up the Talend Studio; however, when I try and run the OnBoardingDemoJob I get the error message " Could not find or load main class". I also tried creating a job of my own, but I got the same error message when tried to run it.
Java seams to be installed correctly as running "java -version" in terminal returns this:
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

echo $JAVA_HOME returns:
/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
echo $JRE_HOME returns:
/usr/local/ jdk
Under Preferences-->JAVA-->Installed JREs in Talend Studio, there is only one installed JRE: Home (default). The location is /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
Please let me know if there is any other information that I need to provide so you can help me.
Thank you.
Anonymous
Not applicable
Author

Hi ericbelfort,
What's the mac version you are using?
Have you already checked document about:TalendHelpCenter:Compatible+Operating+Systems to see if  you are on a compatible platform?
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi Sabrina,
Thank you for the quick reply. I have the latest version of Apple's OS: macOS Sierra (Version 10.12). This is the same version that my colleague is using and it is working on his machine.
Best regards,
Eric