Could not find or load main class in talend

Four Stars

Could not find or load main class in talend

Hello, i get error : could not find or load main class when i execute job in Talend. Below are the details about talend and java installed. It used to work in my old system, however, I can't recall java version but Talend version was same. I have checked all the discussions revolving around this issue, but nothing worked. Please reply if anyone knows how to fix it. Talend V6.2 jdk1.8.0_131
Five Stars

Re: Could not find or load main class in talend

;Seems to be a case of corrupt workspace.

Try building a fresh workspace and import jobs there.

Moderator

Re: Could not find or load main class in talend

Hi,

Have you already checked the installation path to your workspace? Any space?

Please follows the steps as below to restore the items.
1. Back up the workspace.
2. Delete the workspace and restart the studio.
3. Import all items from the backup of workspace done in step1.

Let us know if it is Ok with you.

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.
Four Stars

Re: Could not find or load main class in talend

Thanks for the replies. However, there was no workspace issue. The issue was of java version mismatch. I think Talend doesn't support latest java version i.e java1.8_131. I downgraded java to update 77 and it worked just fine. Hope this helps someone else.
Four Stars

Re: Could not find or load main class in talend

Same issue here, but the downgrade of Java was not the solution.

Any other ideas?

Thanks!

Moderator

Re: Could not find or load main class in talend

Hi schaeffi112,

What's JDK version you are using? Could you please give us more information about your current situation?

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.
Four Stars

Re: Could not find or load main class in talend

Hi Sabrina,

as recommended, I switched back to javac 1.8.0_77

Which variables do I have to define? At the moment, I have

  • CLASSPATH in C:\Program Files\Java\jdk1.8.0_77\bin
  • JAVA_HOME in C:\Program Files\Java\jdk1.8.0_77
  • PATH in C:\Program Files\Java\jdk1.8.0_77\bin

Anything I have forgotten?

 

Thank you

Christian

Moderator

Re: Could not find or load main class in talend

Hello,

Could you please try to type java -version in cmd to see if your java environment is set correctly? Are you using oracle JDK 1.8?

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.
Four Stars

Re: Could not find or load main class in talend

Hi Sabrina,

Yes, I took the download from Oracle.

 

java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)

 

Best regards

Christian

Employee

Re: Could not find or load main class in talend

Install the studio in a path other than Program Files. Try to install the studio in C:\Talend\Studio.

Put your workspace also in a folder without a space in the path like C:\Talend\workspace
Moderator

Re: Could not find or load main class in talend

Hi,

Please 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

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: Could not find or load main class in talend

Hi,

 

sorry, that does not fix it - but I imported the job from the old workspace. Should I set it new?

 

Best regards

Christian

Four Stars

Re: Could not find or load main class in talend

Hi I am facing this issue now.  I am running the job from Talend Studio 6.4 and having the TargetExec as a our production Job server hosted on AWS.  I am having the issue only when for a specific Talend Big Data Job.  The job starts running fine when I choose the Mode as 'Standalone' under Spark Configuration, however it fails with the following error when run as 'Yarn Client' mode.  Please note that I am using Macbook and the typical response in many of the forums for this error is about having spaces in the installation path.  But as I am running from Mac and also executing the job in the remote job server, I dont believe this is the issue. 

 

Error: Could not find or load main class

Job Caliper_to_Epsilon_GetEmail_Combined ended at 09:32 12/01/2018. [exit code=1]

Moderator

Re: Could not find or load main class in talend

Hello humapathy,

Does this issue only repro on your specific Talend Big Data Job? What does your bigdata job look like? Could you please give us more information about your Big Data Job? Screenshots of job setting will be preferred.

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.
Four Stars

Re: Could not find or load main class in talend

Hi

This happens for a specific big data job.  I am attaching the screenshot of the job as well as the settings for your reference. Screen Shot 2018-01-18 at 3.21.47 PM.pngScreen Shot 2018-01-18 at 3.21.21 PM.png

Moderator

Re: Could not find or load main class in talend

Hello,

We see that you are using tLibraryLoad component in your workflow without any connector(OnsubjobOk). Could you please give us some description about your job design? More information will be preferred.

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.
Six Stars

Re: Could not find or load main class in talend

Dear All,

 

One of the major causes for this issue is when you have imported a incompatible or incorrect class/jar.

 

 

Work-Around:

User should be able to identify the recently added jars from Talend Jars Location.

Delete any external class/jar file(s) which when added started this issue and restart the Talend.

 

Talend Jars Location:

x:\Talend_base_location...\configuration\.m2\repository\org\talend\libraries

 

Thanks,

Jagadish.