How to deploy a CDATA adapter in TIBCO Data Virtualization?

How to deploy a CDATA adapter in TIBCO Data Virtualization?

book

Article ID: KB0071348

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization All supported versions

Description

This article provides details on the two options to deploy a new CDATA adapter. This approach can also be used to update an existing adapter with a newer version in TIBCO Data Virtualization. 

Issue/Introduction

How to deploy a CDATA adapter in TIBCO Data Virtualization?

Environment

All supported Operating Systems

Resolution

Option I: Auto Deployment (Needs TDV Server restart)

1. Obtain new adapter (eg. tdv<adapter_name>.zip) and unzip the contents to any location on the TDV Server machine. 
Note: The jar file to be deployed will be in the format tdv.<adapter_name>.jar. Example for the Snowflake jar file -
User-added image
2. Copy this tdv.*.jar to <TDV_Server_Install_Dir>\packages\autodeploy_ds_adapters folder. 

3. Restart TDV Server.  

To verify the driver is successfully deployed - it will be present under <TDV_Server_install>\packages\ with the current timestamp. In this example, the deployed driver would be named as Snowflake_1.jar - 
User-added image
Also, the following message will be seen logged in cs_server.log file - 
 INFO [main] 2023-04-05 12:51:26.350 -0400 DefaultDSExtensionPackageManager -  Deploying built-in adapters  INFO [main] 2023-04-05 12:51:26.624 -0400 ExtensionManager -  Undeployment of Extension Package Snowflake:1 is successful!  INFO [main] 2023-04-05 12:51:28.694 -0400 DefaultDSExtensionPackageManager -  Deployment of built-in toolkit adapters completed
If the driver is still under the location <TDV_Server_install>\packages\autodeploy_ds_adapters or goes under <TDV_Server_install>\packages\archived_ds_adapters, then the adapter was not deployed successfully. 

Option II: Manual Deployment (without TDV Server restart)
To deploy the adapter manually, you can execute with the server_util utility via the command line.
1. Obtain new adapter (eg. tdv.<adapter_name>.zip). Extract the tdv.*.jar from the .zip file to the location of your choice on your Linux machine.

2. Check if you have already deployed tdv.<adapter-name>
Linux: ls -al ./packages
Windows: dir .\packages
Example:tdv.snowflake.jar is represented as <TDV_Server_Install>/packages/Snowflake_1.jar when TDV Server has already deployed it.

3. If you find your <adapter_name> in the previous step, you must undeploy it first. You can undeploy the adapter using the command below from the TDV install directory:
Linux: ./bin/server_util.sh -server <hostname> [-port <port> ] -user <username> -password <password> -undeploy -name <adapter-name> -version 1
Windows: .\bin\server_util.bat -server <hostname> [-port <port> ] -user <username> -password <password> -undeploy -name <adapter-name> -version 1
Note: for undeploy must match the adapter name under /packages that you are trying to undeploy (without the _1 at the end of the jar file name). 
The port number is the TDV base port. 

Example - 
Linux: ./bin/server_util.bat -server localhost -port 9200 -user admin -password password -undeploy -name Snowflake -version 1
Windows: .\bin\server_util.bat -server localhost -port 9200 -user admin -password password -undeploy -name Snowflake -version 1

Screenshot of undeployment of the Snowflake adapter on Windows for reference - 
User-added image

4. To deploy the adapter using the command below:
Linux: ./bin/server_util.sh -server <hostname> [-port <port> ] -user <username> -password <password> -deploy -package ./tmp/tdv.<adapter-name>/tdv.<adapter-name>.jar
Windows: .\bin\server_util.bat -server <hostname> [-port <port> ] -user <username> -password <password> -deploy -package .\tmp\tdv.<adapter-name>\tdv.<adapter-name>.jar
Note: package location is dependent upon the chosen extraction location. 

Example:
Linux: ./bin/server_util.bat -server localhost -port 9200 -user admin -password password -deploy -package /tmp/drivers/tdv.snowflake.jar
Windows: .\bin\server_util.bat -server localhost -port 9200 -user admin -password password -deploy -package C:\Users\sigujar\Downloads\drivers\tdv.snowflake.jar

Screenshot of deployment of Snowflake adapter on Windows for reference - 
User-added image

To verify the driver is successfully deployed - the driver will be seen under <TDV_Server_install>\packages\ with today's timestamp. Also, the following message will seen logged in cs_server.log file when undeployment and deployment of the adapter - 
 INFO [jetty thread pool-200] 2023-04-05 13:51:13.195 -0400 ExtensionManager -  Undeployment of Extension Package Snowflake:1 is successful!   INFO [jetty thread pool-217] 2023-04-05 14:01:55.697 -0400 ExtensionManager -  Deployment of Extension Package Snowflake:1 is successful!
Note - If the cs_server.log show an error stating "NoClassDefFoundError", you would need to restart TDV Server to load the new driver.