Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
oandgtc
Contributor
Contributor

Control the order of lib / jar files to load

Hi Talend Community

When we build standalone jobs in Talend which have external library dependencies we see an issue where our libraries load in the wrong order causing a class not found situation.

In the run bat file created for the standalone job we see syntax such as

java -Dtalend.component.manager.m2.repo=%cd%/..lib -Xms2048M -Xmx4096M -cp .;../lib/routines.jar;../lib/one.jar;../lib/two.jar

What we need is /lib/one.jar to load first to look like this .;../lib/one.jar;../lib/routines.jar;../lib/two.jar

Is there a way to control the order in TOS ?

Labels (4)
3 Replies
Anonymous
Not applicable

Hello,

On which talend build version you got this issue? Did you get this issue when do the installation process by auto or manual?

Could you please post the whole error message here that the wrong order causing a class not found issue?

Best regards

Sabrina

 

oandgtc
Contributor
Contributor
Author

Hi there, its Talend 7.1.1.201810026_1147, the issue we see today is after we do a manual build of a Talend Job (creating a standalone job).

 

We have identified the the issue to the fact we need /lib/one.jar to load first, we tested the theory by manually updating the order of the jars so that one.jar loads first and all is OK, but we wanted to know if there is a way to set the order of libs in TOS so that it builds with the order we need ?

 

This is what we get when we do the standalone build

java -Dtalend.component.manager.m2.repo=%cd%/..lib -Xms2048M -Xmx4096M -cp .;../lib/routines.jar;../lib/one.jar;../lib/two.jar

but we want to control the order so that is looks like this

java -Dtalend.component.manager.m2.repo=%cd%/..lib -Xms2048M -Xmx4096M -cp .;../lib/one.jar;../lib/routines.jar;../lib/two.jar

 

Thank you

Anonymous
Not applicable

Hello,

There is no way to control the order of these .jars in the classpath and you could manually edit the job script when you build your job as a standalone one.

Best regards

Sabrina