Skip to content

Configure ImportClient with a custom driver

This guide helps you to configure ImportClient with a custom class / driver for JDBC or another 3rd party java class for JDBC.

References

In this guide we will refer to the following.

  • ImportClientRoot** = D:\Easit\ImportClient
  • JAR filename for driver = ourCustomDriver.jar
  • Fully Qualified Class Name = com.company.package.getDataClass

ImportClient root

If this is the first custom driver you are setting up start by creating a directory / folder named CustomDrivers inside the ImportClientRoot directory. The directory should look like this after.

  • Easit
    • ImportClient
      • CustomDrivers
      • jre
      • import-client-x.jar
      • run.cmd // run.sh

Put the JAR file inside the CustomDrivers directory.

  • Easit
    • ImportClient
      • CustomDrivers
        • ourCustomDriver.jar
      • jre
      • import-client-x.jar
      • run.cmd // run.sh

ImportClient environment

In order for ImportClient to find the driver, we need to add its path to the CLASSPATH environment variable or specify it with the -cp argument when running ImportClient.

CLASSPATH

Add path to custom.jar (driver) to the CLASSPATH.

1
    $env:CLASSPATH = "[ImportClientRoot]\CustomDrivers\ourCustomDriver.jar;" + $env:CLASSPATH
1
    export CLASSPATH="$CLASSPATH:[ImportClientRoot]/CustomDrivers/ourCustomDriver.jar"

-cp argument

If you do not want to add the path to your CLASSPATH variable you can pass the path as an argument directly to JAVA when running the ImportClient.

Inside ImportClientRoot you should have a file named run.cmd or run.sh depending on your OS. Edit it and add the following to the JAVA command.

-cp "[ImportClientRoot]\CustomDrivers\ourCustomDriver.jar"

Full example:

1
2
3
    set client=import-client.jar
    set java=jre\bin\java.exe
    "%java%" -cp "CustomDrivers\ourCustomDriver.jar" -Xmx512m -jar %client% customDriverconfiguration.txt
1
    jre/bin/java -cp "CustomDrivers/ourCustomDriver.jar" -Xmx512m -jar import-client.jar customDriverconfiguration.txt

ImportClient GUI (inside Easit GO)

Easit GO ImportClient Configuration GUI implements a generic GUI for the JDBC implementation exposing the Connection string, Query and Driver class name options. When ImportClient runs it get the configuration from Easit GO and executes the driver class with a JDBC template. As long as the driver implements the JDBC standard, this will "just work". Now we proceed with setting up our ImportClient configuration.

Type

We want this configuration to be of type JDBC.

Connection string

Here we specify the connection details for the source. Please advise the drivers documentation for how the connection string should be formatted.

Query

Here we specify the query we would like to perform against the source. Please advise the drivers documentation for more information.

Driver class name

Here we specify the fully qualified class name for the driver. Also known as reference to class.

Closing words and further reading

When you have completed all actions above and save the configurations you can try running the ImportClient.

If you for some reason need to troubleshoot or see the result while running ImportClient, you can run it directly from a terminal or console.

1
    pathToJavaExecutable -Xmx512m -cp pathToCustomDriver.jar -jar importclient.jar customDriverconfiguration.txt