Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
cmbalderrama
Contributor
Contributor

Could not find or load main class only when running in linux outside talend

Hello,

I´m using Talend Open Studio for Data Integration (6.5.1) and I have a simple test job with a tJava_1 that only prints a line.

0683p000009LtbC.png

 

When I try to run it in Talend works fine, when I build it and run it in Windows with the .bat file that is generated by Talend , works fine, but when I try to run it in Linux with the .sh file that is generated by Talend I get the error 

Error: Could not find or load main class sharepoint.helloworld_0_1.HelloWorld 

(hello world is my job and sharepoint is my local repository)

 

In the computer where I have talend (with Windows) I'm using java jre1.8.0_161.

In the linux computer I have the same (and I also tried with jdk1.8.0_161)

I configured my JAVA_HOME and PATH in the /etc/profile and I think thats fine, If I do java -version I get this:


java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

 

I also tried to run a HelloWorld made outside talend to see if Java was working fine and it is. So my guessing is that is something when is beeing build for Unix system, but I'm not sure.

 

Do you have any other idea of what could be?

Thanks..

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hello,

Before building your Job, could you please go to Window > Preferences, select Talend > Import/Export, and then select the Add classpath jar in exported jobs check box to wrap the Jars in a classpath.jar file added to the built Job?

Let us know if it is OK with you. And did you select "Java source" check box on the "Build job " window to export the .java file holding Java classes generated by the Job when designing it?

Best regards

Sabrina



To see the whole post, download it here
OriginalPost.pdf

View solution in original post

2 Replies
Anonymous
Not applicable

Hello,

Before building your Job, could you please go to Window > Preferences, select Talend > Import/Export, and then select the Add classpath jar in exported jobs check box to wrap the Jars in a classpath.jar file added to the built Job?

Let us know if it is OK with you. And did you select "Java source" check box on the "Build job " window to export the .java file holding Java classes generated by the Job when designing it?

Best regards

Sabrina



To see the whole post, download it here
OriginalPost.pdf
cmbalderrama
Contributor
Contributor
Author

Yes, Thank you! 

.Checking the Add classpath jar in exported jobs check box worked. And I did have the Java source checkbox checked before.

 

Thanks for your quick answer and the help.