Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Add external jars to classpath of the .bat/.sh script generated

Hi Team,
I'm using Talend Open Studio for Data Integration version 5.5.1 in my ETL project. Here I have routine which is using an API developed by myself and that API is using some external jars. That API has been exported as a jar file and add as an external lib to the routine. But when I'm running the build job suing .bat file I'm getting NoClassDefFound exception from the class of the API. That is because it cannot resolve the external jars using in that class. 
If I manually add those external jars to the lib folder and manually edit the classpath of the .bat script it works. Is there any way to resolve this issue rather manually editing the .bat file? Is it possible to include those external jars so that they will be automatically picked up in building the job and classpath is also generated accordingly? 

Thanks and Regards,
Asanka. 

Labels (2)
2 Replies
Anonymous
Not applicable
Author

Hi,
You can not create jar file in talend.
Have you tried to use tlibraryload to load external jars into your job?
Here is the component reference about:TalendHelpCenter:tLibraryLoad
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi Sabrina


Thank you for your reply. 

Here I'm not using Talend to create jar files. I'm using Eclipse for that purpose. I cannot use tLibraryLoad component since it does not allow to add multiple jars.

I have sorted out the issue by adding all the dependency jars as external jars to the Routine that I'm using in the Talend. With this approach when a job is built it copies all my external jars to the lib folder and add them to the classpath of the .bat/.sh scripts. 

Thanks and Regards,
Asanka.