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 Sabrina,
I found out what was causing the problem. I had a symbolic link to a jar under /Library/Java/Extensions. I am guessing that symbolic link was broken (as in pointing to a file that was not there anymore). Once I deleted the symbolic link, I stopped getting that "Could not find or load main class" error message.
If you allow me some constructive criticism, this error message is too generic to help anyone figure out how to solve the issue. It was only after trying many things without success, a lost day of work and much frustration that, while poking around aimlessly, I stumbled upon further error messages under the "Problems" tab. It was following that lead that I decided to delete the symbolic link to test wether this could be what was preventing Talend from "loading the main class".
At the very least, I would recommend complementing that error message to indicate that the user should review the "Problems" tab to check for underlying problems that may be preventing Talend from "loading the main class".
I hope this helps other people.
Best regards,
Eric
Anonymous
Not applicable
Author

Hi ericbelfort,
Thanks for your suggestion and prompt reply. So far,  macOS Sierra (Version 10.12) is not list on the supported compatible platform.
In the documentation we provide a list of platforms that are supported, in the sense that we do provide an SLA and technical support for them. This doesn't mean other (non-listed) platforms will not work but simply we won't necessarily be equipped to help you with any issue you may face with them.
Best regards
Sabrina
mertez
Contributor III
Contributor III

I have not made a lot of research but find out that after modifying the *run.sh file error has gone. Changes applied:
- comment out line
# cd `dirname $0`

- add line
cd `dirname -- "$0"`

os: centos 7.2
Talend open studio 6.3.1
Same thing can be achieved by modifying the build process:
0683p000009MAIZ.png
Error was spotted by running  cd `dirname $0` which resulted in an error.
Anonymous
Not applicable
Author

Hello Sabrina,

 

I am getting the same error : "Error: Could not find or load main class" while running job with MSSQL server as input.

 

Talend version is 6.3.1 and i have Java 8 installed on my PC using Talend open studio for DI.

The job is very simple to pull records from source table to a excel file.

 

I have the environment variable JAVA_HOME is set the right java 8 path.

 

 

Can you please help/guide on this to resolve the issue. Let me know if you have any more queries

 

Thanks,

Shobhit

Anonymous
Not applicable
Author

Hello,

What does your installation path look like? Please make sure that you install product in a short path without any special characters, such as blank space.
You cannot change the installation path but you can re-install talend production.

Best regards

Sabrina

Anonymous
Not applicable
Author

Yep - we have same message in our test env ...    dev and prod running fine ..

Job runs fine in Studio but not when deployed via TAC.   Existing jobs in test env TAC work .. (until I do a generate on them)

I can even run in studio on the remote job server where it fails in TAC.

 

A previous staff member said it was revolved 2 years ago when it occured .. " there was an orphan ID " ...

 

I am not sure what he meant by "Orphan ID" however ..

 

Anonymous
Not applicable
Author

Hello Philippe,

Are you using JDK 1.8?

With your subscription solution, have you already created a case  on talend support portal? In this way, we can give you a remote assistance through support cycle with priority.

Best regards

Sabrina

Anonymous
Not applicable
Author

Hi Folks,

 

I had similar problem yesterday. I got the error Could not find or load main class ***

But realized that this was happening to all jobs which were working fine before.

 

After some research I realized I had re-organized my jar files and some of those were being referenced in the project.

 

So a quick check is to see if this affects only the new job or is affecting existing jobs.

 

Please check it once and make sure if your jars for jdbc or other job specific addon jars havent changed location.

 

Regards

AD 

Anonymous
Not applicable
Author

Hi,

 

I have exactly the same issue.

My Job is working fine in TOS but when building the JOB and extracting the Zip on the same computer, I run the batch file and get the following: Error: Could not find or load main class

 

I am on Windows 10, when doing java-version I get the following:

java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

 

This is how I defined my Env. Variables:

JAVA_HOME = C:\Program Files\Java\jre1.8.0_181

Path = C:\Program Files\Java\jdk1.8.0_181\bin

CLASSPATH = %JAVA_HOME%\jre\lib\rt.jar;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar

 

I have tried playing with variables, re-exporting but without success.

 

Please help... 0683p000009MPcz.png

 

 

 

Anonymous
Not applicable
Author

Hello @elieprz

Does this issue repro on all your jobs or a specific one?

Best regards

Sabrina