How to include multiple runtime JAR files with a Job


There are two ways to include one or more JAR files with a Job:

  1. tLibraryLoad—Use a tLibraryLoad component to load a single JAR (or multiple JARs, using the Advanced settings tab), or
  2. Routine Libraries—Set a code routine as a dependency of your Job, and include libraries on that routine.


Problem Description

When running a Job, you may get one of the following errors:





For example:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/drill/exec/rpc/RpcException
at com.mapr.drill.core.DRJDBCConnection.connect(Unknown Source)
at com.mapr.jdbc.common.BaseConnectionFactory.doConnect(Unknown Source)
at com.mapr.jdbc.common.AbstractDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(
at java.sql.DriverManager.getConnection(
at acme.drill_test_0_1.drill_test.tJDBCConnection_1Process(
at acme.drill_test_0_1.drill_test.runJobInTOS(



Job (an executable Java class) is not able to find a class in its classpath.





  1. Add a tLibraryLoad component to your Job.
  2. Select the first JAR file you need to load in the Library drop-down list (use the ... Browse selector if you need to).
  3. Click Advanced settings.
  4. Click the + (Add JAR) button and type the filename (not the full path) of the JAR you need to add, for example "sqljdbc42.jar". Note that you must use the double quotes.
  5. Repeat the above step for all the JAR files the Job needs.
  6. Run the Job.
  7. Studio will prompt you to locate/load all the required Jobs it cannot find.
  8. Studio will finish loading JAR files and will run the Job.




Routine Libraries

Right-click a routine you use in your Job and select Edit routine libraries, then add the JAR files you need.


Even if you do not use any routines in your Job, you can still use this method.

  1. Create a routine in Code > Routines called JarHolderRoutine (or any name you wish).
  2. Add the JAR files you need. The screenshot below shows the various popups you will see when adding a new JAR to your routine as a Routine Library.




  3. Link the routine to your Job:

    1. Close your Job.
    2. Right-click the Job, then select Setup routine dependencies.
    3. Click + to add the new JarHolderRoutine routine.
Version history
Revision #:
9 of 9
Last update:
‎09-29-2018 12:13 AM
Updated by:
Labels (3)