Talend Connect
Virtual Summit
JOIN US!
And visit the Customer
& Community Lounge.
May 27-28, wherever you are.

CLI Deploy Error Could not find or load main class org.eclipse.core.launcher.Main

Highlighted
Five Stars

CLI Deploy Error Could not find or load main class org.eclipse.core.launcher.Main

Hi there,

 

I´m struggling at the moment with CI/CD stuff with Talend 7.1.

 

I have installed TAC 7.1, Nexus 3, Maven, GIT and Jenkins... Now I was working with this documentation as Talend CommandLine is deprecated up from 7.1.

 

Now i have configured one Jenkins Maven Deploy job with following settings:

TALEND_POC/poms/pom.xml

deploy -X -fae -amd

-Dgeneration.type=local
-Dproduct.path=/talend/Talend-Studio-20181026_1147-V7.1.1/configuration/.m2/repository
-Xmx3076m
-DaltDeploymentRepository=talend-custom-libs-release::default::http://SERVER:8081/repository/talend-custom-libs-release/
-Dproject.distributionManagement.repository.url=http://SERVER:8081/repository/talend-custom-libs-release/
-Dproject.distributionManagement.repository.id=talend-custom-libs-release

 

After Run and Downloading all packages i get this Error: (Job Console)

[DEBUG] Reading global toolchains from /talend/apache-maven-3.6.0/conf/toolchains.xml
[DEBUG] Reading user toolchains from /home/user/.m2/toolchains.xml
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] TALEND_POC Codes Master [pom]
[INFO] TALEND_POC Routines [jar]
[INFO] TALEND_POC p_import_jamesbond-0.1.0 (0.1,Job Designs) [jar]
[INFO] TALEND_POC c_import_jamesbond_cars-0.1.0 (0.1,Job Designs) [jar]
[INFO]
[INFO] -----------------< org.example.talend_poc:code.Master >-----------------
[INFO] Building TALEND_POC Codes Master 7.1.1 [1/4]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- builder-maven-plugin:7.1.1:generate (default) @ code.Master ---
[DEBUG] CurrentProject=TALEND_POC Codes Master
[DEBUG] **** START **** Prepare List to build
[DEBUG] CurrentProject=TALEND_POC Codes Master
[DEBUG] firstProject=TALEND_POC Codes Master
[DEBUG] Nothing to build in=TALEND_POC Codes Master
[DEBUG] Nothing to build in=TALEND_POC Routines
[DEBUG] Project=TALEND_POC / id=_89MjsCrHEemETvAiHJxSZA / version=0.1
[DEBUG] Project=TALEND_POC / id=_jhZpUCrIEemETvAiHJxSZA / version=0.1
[DEBUG] **** END **** Prepare List to build
[INFO]
[INFO] *****************************************************
[INFO] Workspace found :/var/lib/jenkins/workspace/DEPLOY_PROJECT
[INFO] List projects from:/var/lib/jenkins/workspace/DEPLOY_PROJECT
[INFO] Not valid folder (no talend project) in:.git
[INFO] Found project:TALEND_POC
[INFO]
[INFO] Creating the detected projects for Commandline workspace.
[INFO] Created project (base on existing folder): TALEND_POC
[ERROR] Error: Could not find or load main class org.eclipse.core.launcher.Main
ERROR: Maven JVM terminated unexpectedly with exit code 1
Finished: FAILURE

 

I have already delete the workspace and checked java and some dependencies but it dont work.

It seems like the studio has not this dependency "org.eclipse.core.launcher"?!

Can anyone help me?

thanks egistar

Highlighted
Employee

Re: CLI Deploy Error Could not find or load main class org.eclipse.core.launcher.Main

Hello

 

Please try the product.path to the Studio (<commadline_home>/Studio) in your jenkins job. It should work.

in your case may be -Dproduct.path=/talend/Talend-Studio-20181026_1147-V7.1.1

 

Highlighted
Five Stars

Re: CLI Deploy Error Could not find or load main class org.eclipse.core.launcher.Main

Oh perfect... this works..

 

Scripts are going forward now.. But I think I have the last problem until the process is finished.

 

My test-job is separated into a parent-job which call a child-job with tRunJob.

In child-job is a System.out.print only.

 

Deployment now got failure on childjob. Parent-Job is running perfectly:

 

Can´t reach maven goal deploy:

 

Error is:

 

talend_poc.c_import_cars_0_1 cannot be resolved to a type

 

and at the end:

 

Failed to transfer file http://inhas66913:8081/repository/releases/org/example/talend_poc/job/c_import_cars/0.1.0/c_import_cars-0.1.0.jar with status code 400 -> [Help 2]

 

Anyone an idea why parent-job runs without errors and child-job with a simple System.out.print in an tJava fails?

Highlighted
Employee

Re: CLI Deploy Error Could not find or load main class org.eclipse.core.launcher.Main

Hi

There are two errors which I see one related to resolution and other for Nexus. For resolution error please check if you are able to execute the job in Studio itself.

 

First I believe its clear with the goal deploy maven is going to publish the artifact to Nexus (or artifactory). It does not mean that it is going to deploy the job on jobserver. There is no execution of the job involved here. So it does not matter what have you implemented in your child job. 

 

The error you are facing seems to be due to usage of release artifact. I believe you are still developing so you should be using snapshots. The release artifact can not be overridden so you are facing this error. Once you reach a milestone in your project then you use release artifact. 

 

P.S. May be you want to create another thread as it would misleading from your original issue you started thsi thread for. 

 

Highlighted
One Star

Re: CLI Deploy Error Could not find or load main class org.eclipse.core.launcher.Main

Hello,
I have similar issue; the dependency is missing "org.eclipse.core.launcher.Main".

I am using Talend 7.1.1 and trying to build the job in jenkins.
Some logs:
[DEBUG] **** START **** Prepare List to build
[DEBUG] CurrentProject=TALEND_PROJECT Codes Master
[DEBUG] firstProject=TALEND_PROJECT Codes Master
[DEBUG] Nothing to build in=TALEND_PROJECT Codes Master
[DEBUG] Nothing to build in=TALEND_PROJECT Routines
[DEBUG] Project=TALEND_PROJECT / id=_sdfsdf4UsLHWEemkcM-pNTBFtg / version=0.1
[DEBUG] **** END **** Prepare List to build
[INFO]
[INFO] *****************************************************
[INFO] Workspace found :/home/jenkins/.jenkins/workspace/Talend_Pipeline
[INFO] List projects from:/home/jenkins/.jenkins/workspace/Talend_Pipeline
[INFO] Not valid folder (no talend project) in:.git
[INFO] Found project:TALEND_PROJECT
[INFO]
[INFO] Creating the detected projects for Commandline workspace.
[INFO] Created project (base on existing folder): TALEND_PROJECT
[ERROR] Error: Could not find or load main class org.eclipse.core.launcher.Main
[Pipeline] }
Deleting 1 temporary files
[Pipeline] // configFileProvider
[Pipeline] }
[Pipeline] // stage
Connection terminated
[Pipeline] }
[Pipeline] // dockerNode
[Pipeline] End of Pipeline
ERROR: script returned exit code 1
Finished: FAILURE

-------------------------------------
-Dproduct.path=/home/jenkins/.jenkins/workspace/Talend_Pipeline/

One point I don't understand, do we need commandLine studio or CI Builder will takecare of it?

Thanks,
Jitu

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

The Forrester Wave: Strategic iPaaS and Hybrid Integration Platforms, Q1 2019

Find out how Forrester rate different iPaaS and Hybrid Integration Platforms

Read

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog

Downloads and Trials

Test drive Talend's enterprise products.

Downloads