<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Qlik Talend: Resolving class and JAR related issues in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Talend-Resolving-class-and-JAR-related-issues/ta-p/2151442</link>
    <description>&lt;P&gt;There can be many root causes for JAR file errors and just as many ways to investigate and fix them. This article shows you how to troubleshoot some of the issues related to external, and Talend generated JAR files.&lt;/P&gt;
&lt;P&gt;To understand what can lead to JAR file issues, you need to understand how Talend code generation works. Talend builds Java code and compiles that code into classes, then stores them in JAR files. Thus the following error could mean many things, such as:&lt;/P&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;
&lt;P&gt;JAR file doesn't exist&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;JAR exists, but it's empty&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;JAR file is missing from the &lt;STRONG&gt;.sh&lt;/STRONG&gt; / &lt;STRONG&gt;.bat&lt;/STRONG&gt; file; or is present with the wrong name&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;JAR is not in the right format:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;'Could not find or load * class'&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;SPAN&gt;You can unzip JAR files and verify that they contain &lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;"&gt;.class&lt;/STRONG&gt;&lt;SPAN&gt; files.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;For more information on building Java code, see &lt;/SPAN&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://help.talend.com/r/TOI27xbqXMpvbDuWTdnVoQ/knYGp5XGdqtnsCCzAge0eQ" target="_blank" rel="noopener"&gt;Component code generation model&lt;/A&gt;&lt;SPAN&gt;, available in the Talend Help Center.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Problem types&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;There are many causes for errors. The following examples help you understand some of the different reasons.&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Missing external libraries&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;It is important to understand how external libraries link to Talend Jobs.&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Components&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;To understand what component requires which JAR file see &lt;A href="https://help.talend.com/r/TE5n15~xt69w66DJpqAvMQ/I6XWAF75C8EUigBCCZDYqw" target="_blank" rel="noopener"&gt;Installing external modules&lt;/A&gt; in the Talend Help Center.&lt;/P&gt;
&lt;P&gt;Sometimes a component uses different JARs based on different settings. For example, an Oracle connection uses different drivers for different versions, and using SSL can include a few extra JARs in the build.&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Routines&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;Working with an SDK or API and writing Java code can be done in the Jobs as well, but using a Routine is usually more convenient. You can add dependent JARs in the Routines by clicking &lt;STRONG&gt;Edit Routine Libraries&lt;/STRONG&gt;, checking if the JAR exists as a &lt;STRONG&gt;Platform&lt;/STRONG&gt;&amp;nbsp;JAR, then select it as shown below:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="minimaljson.gif" style="width: 600px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125885i3C35EEC4B5A60F18/image-size/large?v=v2&amp;amp;px=999" role="button" title="minimaljson.gif" alt="minimaljson.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Understanding the Required check box&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;Before Talend 7, the Routine editor recognized the JARs from the open Jobs. The Routine was compiled together with the Jobs and their dependencies without validating the generated Java code.&lt;/P&gt;
&lt;P&gt;However, in Talend 7, Routines are compiled as standalone entities before any of the Jobs are compiled, requiring the JARs to be present. Selecting the &lt;STRONG&gt;Required&lt;/STRONG&gt; check box includes JARs in the final build along with the Routine.&lt;/P&gt;
&lt;P&gt;If &lt;STRONG&gt;Required&lt;/STRONG&gt; isn't selected, then these are still required for the compilation. However, you can only use the Routine with the Jobs that require the dependent JARs; that is, it is either required by another component or forced using the &lt;STRONG&gt;tLibraryLoad&lt;/STRONG&gt; component.&lt;/P&gt;
&lt;P&gt;For example, a Job uses an S3 connection. A Routine is created to use a feature from the Amazon SDK. The Routine requires the AWS SDK for compilation, but it’s optional as it is used together with the S3 connection that loads the SDK.&lt;/P&gt;
&lt;P&gt;In other words: if the Routine is a standalone solution (that is, it uses an SDK that is not available in Talend), you need to select the &lt;STRONG&gt;Required&lt;/STRONG&gt; check box.&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Using the tLibraryLoad component&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;You can use the &lt;STRONG&gt;tLibraryLoad&lt;/STRONG&gt; component to override the loaded JARs and their order. The JARs loaded by this component are placed at the beginning of the classpath, so you can use this component to forcefully load a class. However, Talend recommends using this component to add missing JARs and not to modify JAR versions.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Important&lt;/STRONG&gt;: Classes are loaded from the JARs in the classpath. If multiple JARs contain the same class, the class is loaded from the JAR appearing first in the classpath.&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Possible issues with external libraries&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;The following error may be due to:&lt;/P&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;
&lt;P&gt;JAR files are required to make it fully functioning, but they failed to load&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Routines don't have the &lt;STRONG&gt;Required&lt;/STRONG&gt; check box for the library in dependency, so the build doesn't contain &lt;STRONG&gt;.class&lt;/STRONG&gt; files&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Routines and components require the same JAR but with a different version&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE class="ckeditor_codeblock"&gt;Exception: (java.lang.NoClassDefFoundError) org/apache/commons/csv/CSVFormat&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Another class-related error:&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;Exception in component tFileInputExcel_1 (excel_thmap_test) 
java.lang.IllegalArgumentException: InputStream of class 
    class org.apache.commons.compress.archivers.zip.ZipFile$1 is not implementing InputStreamStatistics. 
   at org.apache.poi.openxml4j.util.ZipArchiveThresholdInputStream.&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;The exception above tells you that the JAR file loaded successfully, and that it is not implementing Statistics. This means that Java is most likely not looking for this JAR file. In this case, a newer version contains a function that implements Statistics. Mixing multiple versions could lead to such errors.&lt;/P&gt;
&lt;P&gt;There are rare cases when the content of a JAR file becomes corrupt inside Nexus or the chosen artifact repository. In this case, you need to fix it manually, as Studio will download it for each build. Each artifact repository is different, but in most cases, you can use the following steps to fix it manually.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;Create a backup of the &lt;STRONG&gt;pom.xml&lt;/STRONG&gt; file (in some cases, it can contain additional dependencies).&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Download the correct JAR file from &lt;A href="https://mvnrepository.com/repos/central" target="_blank" rel="noopener"&gt;Maven Central&lt;/A&gt;.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Delete the artifact folder (JAR, POM, and other files).&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Add a new artifact.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Browse the JAR + POM file.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Studio should automatically download the new JAR file at the next build or execution.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;Possible reasons for this type of corruption include:&lt;/P&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;
&lt;P&gt;File is empty&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;JAR is not a valid zip file (each JAR can&amp;nbsp;be opened as a zip)&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Content doesn't match (&lt;STRONG&gt;MySQL.jar&lt;/STRONG&gt; contains Hadoop classes)&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;JAR file is in a compressed zip file (so uncompressing the file results in the right JAR file)&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Available JARs&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;Sometimes it's necessary to understand what JARs are used by a given component. You can use the &lt;STRONG&gt;Modules&lt;/STRONG&gt; view to see which component uses which JARs and where a given JAR is used.&lt;/P&gt;
&lt;P&gt;For more information about which component requires which JAR file, see &lt;A href="https://help.talend.com/reader/oqupjo25kcKzk8ZROYnQsA/EW17gc0UElpT9DEGXF0jFg" target="_blank" rel="noopener"&gt;Installing external modules&lt;/A&gt;, available in the Talend Help Center.&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Opening the Modules view&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="opening modules view.gif" style="width: 441px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125887i93BE7D282BA5EE28/image-size/large?v=v2&amp;amp;px=999" role="button" title="opening modules view.gif" alt="opening modules view.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H4&gt;&amp;nbsp;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Using the Modules view&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT color="#339966"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="using modules view.gif" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125889i70D40E67C5C306CE/image-size/large?v=v2&amp;amp;px=999" role="button" title="using modules view.gif" alt="using modules view.gif" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Upgrading the JAR version&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;It's generally a good idea to use the latest version in case multiple versions are present. You can do this by copying and pasting the &lt;STRONG&gt;MVN URI&lt;/STRONG&gt; into the &lt;STRONG&gt;Custom MVN URI&lt;/STRONG&gt; field.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="upgrading jar version.gif" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125890i4759A76B67DF5735/image-size/large?v=v2&amp;amp;px=999" role="button" title="upgrading jar version.gif" alt="upgrading jar version.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Main class issue&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;The code Talend generates also results in class files that are packaged into JAR files. The main class JAR file should &lt;STRONG&gt;not&lt;/STRONG&gt; be in the &lt;STRONG&gt;lib&lt;/STRONG&gt; folder but rather in the folder with the same name as the Job itself.&lt;/P&gt;
&lt;P&gt;To display which class is loaded from which JAR, use the following JVM parameter:&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;-verbose:class&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;The following error may be due to:&lt;/P&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;Main Job JAR is not in the right folder (check if it's in a different folder)&lt;/LI&gt;
&lt;LI&gt;JAR files generated by Talend should be in the folder named according to the main Jobs&lt;/LI&gt;
&lt;LI&gt;JAR file size shouldn't be too small (that is, if it's 2 kb, then it is missing something)&lt;/LI&gt;
&lt;LI&gt;Open the &lt;STRONG&gt;.jar&lt;/STRONG&gt; file with 7-Zip and verify that it contains the &lt;STRONG&gt;.class&lt;/STRONG&gt; files&lt;/LI&gt;
&lt;LI&gt;Java is missing or misconfigured.​​​ Inside window/preferences validate the following menus:
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;Java &amp;gt; Installed JREs&lt;/LI&gt;
&lt;LI&gt;Talend (Java Intepreter)&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE class="ckeditor_codeblock"&gt;Error: Could not find or load main class&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;If the JAR file is present and has content, but you are still getting errors: Check the &lt;STRONG&gt;.bat&lt;/STRONG&gt; and &lt;STRONG&gt;.sh&lt;/STRONG&gt; files, and ensure they include the JAR files in the classpath.&lt;/P&gt;
&lt;P&gt;Having extra spaces in the &lt;STRONG&gt;.sh&lt;/STRONG&gt; file between the &lt;STRONG&gt;/lib&lt;/STRONG&gt; and &lt;STRONG&gt;-cp&lt;/STRONG&gt; parameters could also result in such errors, and could be&amp;nbsp;because of multiple things. To help resolve this issue, check the following:&lt;/P&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;In Studio, verify that the &lt;STRONG&gt;Sh&lt;/STRONG&gt; script doesn't have extra spaces in the highlighted area.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="talend job jvmargs.png" style="width: 755px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125891i9C04FEE0E7D3E57E/image-size/large?v=v2&amp;amp;px=999" role="button" title="talend job jvmargs.png" alt="talend job jvmargs.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;
&lt;P&gt;Ensure that the &lt;STRONG&gt;JVMargs&lt;/STRONG&gt; are present and loaded by checking the &lt;STRONG&gt;.bat&lt;/STRONG&gt; and &lt;STRONG&gt;.sh&lt;/STRONG&gt; files. The JVMargs look like this: &lt;STRONG&gt;-Xms256M&lt;/STRONG&gt;.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Collecting information&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;If you are still experiencing issues, this section shows you how to collect additional information to share with the Talend Support team.&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Enable the Error Logs view&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="enable error logs view.gif" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125892iAFCC71C43138FC32/image-size/large?v=v2&amp;amp;px=999" role="button" title="enable error logs view.gif" alt="enable error logs view.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;Window -&amp;gt; Show View -&amp;gt; General/Error logs&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Enabling Maven debug logs&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="enable maven debug logs.gif" style="width: 623px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125893iC77002813A9DFEC7/image-size/large?v=v2&amp;amp;px=999" role="button" title="enable maven debug logs.gif" alt="enable maven debug logs.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H4&gt;&amp;nbsp;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Building the Job&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;Build the Job, then get the &lt;STRONG&gt;lastGenerated.log&lt;/STRONG&gt; file using Project Explorer:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="building the job.gif" style="width: 367px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125894i92970D3786FCFE31/image-size/large?v=v2&amp;amp;px=999" role="button" title="building the job.gif" alt="building the job.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H4&gt;&amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Enabling Project Explorer&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="enabling project explorer.gif" style="width: 353px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125895i5B823A5597FD30E3/image-size/large?v=v2&amp;amp;px=999" role="button" title="enabling project explorer.gif" alt="enabling project explorer.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Locating the lastGenerated.log&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;The file should be under the &lt;I&gt;&lt;STRONG&gt;&amp;lt;PROJECTNAME&amp;gt; _ &amp;lt;JOBNAME&amp;gt;&lt;/STRONG&gt;&lt;/I&gt; folder.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="locating the lastgenerated log.gif" style="width: 353px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125896i9F872275E1F07D1B/image-size/large?v=v2&amp;amp;px=999" role="button" title="locating the lastgenerated log.gif" alt="locating the lastgenerated log.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, collect the &lt;STRONG&gt;Help&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Support Logs&lt;/STRONG&gt; to see if those contain any errors.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="support logs.gif" style="width: 636px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125897iDEB70A9D5483323B/image-size/large?v=v2&amp;amp;px=999" role="button" title="support logs.gif" alt="support logs.gif" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Dec 2025 13:56:04 GMT</pubDate>
    <dc:creator>TalendSolutionExpert</dc:creator>
    <dc:date>2025-12-03T13:56:04Z</dc:date>
    <item>
      <title>Qlik Talend: Resolving class and JAR related issues</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Talend-Resolving-class-and-JAR-related-issues/ta-p/2151442</link>
      <description>&lt;P&gt;There can be many root causes for JAR file errors and just as many ways to investigate and fix them. This article shows you how to troubleshoot some of the issues related to external, and Talend generated JAR files.&lt;/P&gt;
&lt;P&gt;To understand what can lead to JAR file issues, you need to understand how Talend code generation works. Talend builds Java code and compiles that code into classes, then stores them in JAR files. Thus the following error could mean many things, such as:&lt;/P&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;
&lt;P&gt;JAR file doesn't exist&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;JAR exists, but it's empty&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;JAR file is missing from the &lt;STRONG&gt;.sh&lt;/STRONG&gt; / &lt;STRONG&gt;.bat&lt;/STRONG&gt; file; or is present with the wrong name&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;JAR is not in the right format:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;'Could not find or load * class'&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;SPAN&gt;You can unzip JAR files and verify that they contain &lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;"&gt;.class&lt;/STRONG&gt;&lt;SPAN&gt; files.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;For more information on building Java code, see &lt;/SPAN&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://help.talend.com/r/TOI27xbqXMpvbDuWTdnVoQ/knYGp5XGdqtnsCCzAge0eQ" target="_blank" rel="noopener"&gt;Component code generation model&lt;/A&gt;&lt;SPAN&gt;, available in the Talend Help Center.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Problem types&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;There are many causes for errors. The following examples help you understand some of the different reasons.&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Missing external libraries&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;It is important to understand how external libraries link to Talend Jobs.&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Components&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;To understand what component requires which JAR file see &lt;A href="https://help.talend.com/r/TE5n15~xt69w66DJpqAvMQ/I6XWAF75C8EUigBCCZDYqw" target="_blank" rel="noopener"&gt;Installing external modules&lt;/A&gt; in the Talend Help Center.&lt;/P&gt;
&lt;P&gt;Sometimes a component uses different JARs based on different settings. For example, an Oracle connection uses different drivers for different versions, and using SSL can include a few extra JARs in the build.&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Routines&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;Working with an SDK or API and writing Java code can be done in the Jobs as well, but using a Routine is usually more convenient. You can add dependent JARs in the Routines by clicking &lt;STRONG&gt;Edit Routine Libraries&lt;/STRONG&gt;, checking if the JAR exists as a &lt;STRONG&gt;Platform&lt;/STRONG&gt;&amp;nbsp;JAR, then select it as shown below:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="minimaljson.gif" style="width: 600px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125885i3C35EEC4B5A60F18/image-size/large?v=v2&amp;amp;px=999" role="button" title="minimaljson.gif" alt="minimaljson.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Understanding the Required check box&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;Before Talend 7, the Routine editor recognized the JARs from the open Jobs. The Routine was compiled together with the Jobs and their dependencies without validating the generated Java code.&lt;/P&gt;
&lt;P&gt;However, in Talend 7, Routines are compiled as standalone entities before any of the Jobs are compiled, requiring the JARs to be present. Selecting the &lt;STRONG&gt;Required&lt;/STRONG&gt; check box includes JARs in the final build along with the Routine.&lt;/P&gt;
&lt;P&gt;If &lt;STRONG&gt;Required&lt;/STRONG&gt; isn't selected, then these are still required for the compilation. However, you can only use the Routine with the Jobs that require the dependent JARs; that is, it is either required by another component or forced using the &lt;STRONG&gt;tLibraryLoad&lt;/STRONG&gt; component.&lt;/P&gt;
&lt;P&gt;For example, a Job uses an S3 connection. A Routine is created to use a feature from the Amazon SDK. The Routine requires the AWS SDK for compilation, but it’s optional as it is used together with the S3 connection that loads the SDK.&lt;/P&gt;
&lt;P&gt;In other words: if the Routine is a standalone solution (that is, it uses an SDK that is not available in Talend), you need to select the &lt;STRONG&gt;Required&lt;/STRONG&gt; check box.&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Using the tLibraryLoad component&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;You can use the &lt;STRONG&gt;tLibraryLoad&lt;/STRONG&gt; component to override the loaded JARs and their order. The JARs loaded by this component are placed at the beginning of the classpath, so you can use this component to forcefully load a class. However, Talend recommends using this component to add missing JARs and not to modify JAR versions.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Important&lt;/STRONG&gt;: Classes are loaded from the JARs in the classpath. If multiple JARs contain the same class, the class is loaded from the JAR appearing first in the classpath.&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Possible issues with external libraries&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;The following error may be due to:&lt;/P&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;
&lt;P&gt;JAR files are required to make it fully functioning, but they failed to load&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Routines don't have the &lt;STRONG&gt;Required&lt;/STRONG&gt; check box for the library in dependency, so the build doesn't contain &lt;STRONG&gt;.class&lt;/STRONG&gt; files&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Routines and components require the same JAR but with a different version&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE class="ckeditor_codeblock"&gt;Exception: (java.lang.NoClassDefFoundError) org/apache/commons/csv/CSVFormat&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Another class-related error:&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;Exception in component tFileInputExcel_1 (excel_thmap_test) 
java.lang.IllegalArgumentException: InputStream of class 
    class org.apache.commons.compress.archivers.zip.ZipFile$1 is not implementing InputStreamStatistics. 
   at org.apache.poi.openxml4j.util.ZipArchiveThresholdInputStream.&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;The exception above tells you that the JAR file loaded successfully, and that it is not implementing Statistics. This means that Java is most likely not looking for this JAR file. In this case, a newer version contains a function that implements Statistics. Mixing multiple versions could lead to such errors.&lt;/P&gt;
&lt;P&gt;There are rare cases when the content of a JAR file becomes corrupt inside Nexus or the chosen artifact repository. In this case, you need to fix it manually, as Studio will download it for each build. Each artifact repository is different, but in most cases, you can use the following steps to fix it manually.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;Create a backup of the &lt;STRONG&gt;pom.xml&lt;/STRONG&gt; file (in some cases, it can contain additional dependencies).&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Download the correct JAR file from &lt;A href="https://mvnrepository.com/repos/central" target="_blank" rel="noopener"&gt;Maven Central&lt;/A&gt;.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Delete the artifact folder (JAR, POM, and other files).&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Add a new artifact.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Browse the JAR + POM file.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Studio should automatically download the new JAR file at the next build or execution.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;Possible reasons for this type of corruption include:&lt;/P&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;
&lt;P&gt;File is empty&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;JAR is not a valid zip file (each JAR can&amp;nbsp;be opened as a zip)&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Content doesn't match (&lt;STRONG&gt;MySQL.jar&lt;/STRONG&gt; contains Hadoop classes)&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;JAR file is in a compressed zip file (so uncompressing the file results in the right JAR file)&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Available JARs&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;Sometimes it's necessary to understand what JARs are used by a given component. You can use the &lt;STRONG&gt;Modules&lt;/STRONG&gt; view to see which component uses which JARs and where a given JAR is used.&lt;/P&gt;
&lt;P&gt;For more information about which component requires which JAR file, see &lt;A href="https://help.talend.com/reader/oqupjo25kcKzk8ZROYnQsA/EW17gc0UElpT9DEGXF0jFg" target="_blank" rel="noopener"&gt;Installing external modules&lt;/A&gt;, available in the Talend Help Center.&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Opening the Modules view&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="opening modules view.gif" style="width: 441px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125887i93BE7D282BA5EE28/image-size/large?v=v2&amp;amp;px=999" role="button" title="opening modules view.gif" alt="opening modules view.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H4&gt;&amp;nbsp;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Using the Modules view&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT color="#339966"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="using modules view.gif" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125889i70D40E67C5C306CE/image-size/large?v=v2&amp;amp;px=999" role="button" title="using modules view.gif" alt="using modules view.gif" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Upgrading the JAR version&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;It's generally a good idea to use the latest version in case multiple versions are present. You can do this by copying and pasting the &lt;STRONG&gt;MVN URI&lt;/STRONG&gt; into the &lt;STRONG&gt;Custom MVN URI&lt;/STRONG&gt; field.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="upgrading jar version.gif" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125890i4759A76B67DF5735/image-size/large?v=v2&amp;amp;px=999" role="button" title="upgrading jar version.gif" alt="upgrading jar version.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Main class issue&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;The code Talend generates also results in class files that are packaged into JAR files. The main class JAR file should &lt;STRONG&gt;not&lt;/STRONG&gt; be in the &lt;STRONG&gt;lib&lt;/STRONG&gt; folder but rather in the folder with the same name as the Job itself.&lt;/P&gt;
&lt;P&gt;To display which class is loaded from which JAR, use the following JVM parameter:&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;-verbose:class&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;The following error may be due to:&lt;/P&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;Main Job JAR is not in the right folder (check if it's in a different folder)&lt;/LI&gt;
&lt;LI&gt;JAR files generated by Talend should be in the folder named according to the main Jobs&lt;/LI&gt;
&lt;LI&gt;JAR file size shouldn't be too small (that is, if it's 2 kb, then it is missing something)&lt;/LI&gt;
&lt;LI&gt;Open the &lt;STRONG&gt;.jar&lt;/STRONG&gt; file with 7-Zip and verify that it contains the &lt;STRONG&gt;.class&lt;/STRONG&gt; files&lt;/LI&gt;
&lt;LI&gt;Java is missing or misconfigured.​​​ Inside window/preferences validate the following menus:
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;Java &amp;gt; Installed JREs&lt;/LI&gt;
&lt;LI&gt;Talend (Java Intepreter)&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE class="ckeditor_codeblock"&gt;Error: Could not find or load main class&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;If the JAR file is present and has content, but you are still getting errors: Check the &lt;STRONG&gt;.bat&lt;/STRONG&gt; and &lt;STRONG&gt;.sh&lt;/STRONG&gt; files, and ensure they include the JAR files in the classpath.&lt;/P&gt;
&lt;P&gt;Having extra spaces in the &lt;STRONG&gt;.sh&lt;/STRONG&gt; file between the &lt;STRONG&gt;/lib&lt;/STRONG&gt; and &lt;STRONG&gt;-cp&lt;/STRONG&gt; parameters could also result in such errors, and could be&amp;nbsp;because of multiple things. To help resolve this issue, check the following:&lt;/P&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;In Studio, verify that the &lt;STRONG&gt;Sh&lt;/STRONG&gt; script doesn't have extra spaces in the highlighted area.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="talend job jvmargs.png" style="width: 755px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125891i9C04FEE0E7D3E57E/image-size/large?v=v2&amp;amp;px=999" role="button" title="talend job jvmargs.png" alt="talend job jvmargs.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;
&lt;P&gt;Ensure that the &lt;STRONG&gt;JVMargs&lt;/STRONG&gt; are present and loaded by checking the &lt;STRONG&gt;.bat&lt;/STRONG&gt; and &lt;STRONG&gt;.sh&lt;/STRONG&gt; files. The JVMargs look like this: &lt;STRONG&gt;-Xms256M&lt;/STRONG&gt;.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Collecting information&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;If you are still experiencing issues, this section shows you how to collect additional information to share with the Talend Support team.&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Enable the Error Logs view&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="enable error logs view.gif" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125892iAFCC71C43138FC32/image-size/large?v=v2&amp;amp;px=999" role="button" title="enable error logs view.gif" alt="enable error logs view.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;Window -&amp;gt; Show View -&amp;gt; General/Error logs&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Enabling Maven debug logs&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="enable maven debug logs.gif" style="width: 623px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125893iC77002813A9DFEC7/image-size/large?v=v2&amp;amp;px=999" role="button" title="enable maven debug logs.gif" alt="enable maven debug logs.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H4&gt;&amp;nbsp;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Building the Job&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;Build the Job, then get the &lt;STRONG&gt;lastGenerated.log&lt;/STRONG&gt; file using Project Explorer:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="building the job.gif" style="width: 367px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125894i92970D3786FCFE31/image-size/large?v=v2&amp;amp;px=999" role="button" title="building the job.gif" alt="building the job.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H4&gt;&amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Enabling Project Explorer&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="enabling project explorer.gif" style="width: 353px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125895i5B823A5597FD30E3/image-size/large?v=v2&amp;amp;px=999" role="button" title="enabling project explorer.gif" alt="enabling project explorer.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Locating the lastGenerated.log&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;The file should be under the &lt;I&gt;&lt;STRONG&gt;&amp;lt;PROJECTNAME&amp;gt; _ &amp;lt;JOBNAME&amp;gt;&lt;/STRONG&gt;&lt;/I&gt; folder.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="locating the lastgenerated log.gif" style="width: 353px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125896i9F872275E1F07D1B/image-size/large?v=v2&amp;amp;px=999" role="button" title="locating the lastgenerated log.gif" alt="locating the lastgenerated log.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, collect the &lt;STRONG&gt;Help&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Support Logs&lt;/STRONG&gt; to see if those contain any errors.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="support logs.gif" style="width: 636px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125897iDEB70A9D5483323B/image-size/large?v=v2&amp;amp;px=999" role="button" title="support logs.gif" alt="support logs.gif" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2025 13:56:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Talend-Resolving-class-and-JAR-related-issues/ta-p/2151442</guid>
      <dc:creator>TalendSolutionExpert</dc:creator>
      <dc:date>2025-12-03T13:56:04Z</dc:date>
    </item>
  </channel>
</rss>

