Adding MySQL JDBC driver to IM Connector Server
search cancel

Adding MySQL JDBC driver to IM Connector Server

book

Article ID: 220590

calendar_today

Updated On:

Products

CA Identity Manager CA Identity Suite

Issue/Introduction

The following KB article explains how to add MySQL JDBC driver to Connector Xpress: 134411

This allows to successfully deploy JDBC dynamic namespace (endpoint type) for MySQL. However, an attempt to acquire MySQL endpoint in the created namespace fails with this error:

JDBC: Cannot create JDBC driver of class '' for connect URL 'jdbc:mysql://XXX.XXX.XXX.XXX:3306/testdb?characterEncoding=latin1' 

Environment

Release : 14.x

Component : CA IDENTITY MANAGER, CA IDENTITY SUITE (VIRTUAL APPLIANCE)

Cause

OOTB IM Connector Server does not have MySQL JDBC driver

Resolution

In order to deploy MySQL JDBC driver in the IM Connector Server please follow the below steps. On vApp use 'config' user.

1) Download the mysql-connector-java-5.0.8.tar.gz or mysql-connector-java-5.0.8.zip archive from the following location: mySql connector Archives 

2) Extract mysql-connector-java-5.0.8-bin.jar from the downloaded archive

3) Copy the mysql-connector-java-5.0.8-bin.jar file to the machine where IM Connector Server is installed

4) Copy the archive attached to to this KB article to the following location on the machine where IM Connector Server is installed:

Linux: /opt/CA/IdentityManager/ConnectorServer/jcs/resources/jdbc

Windows: C:\Program Files (x86)\CA\Identity Manager\Connector Server\jcs\resources\jdbc

5) Extract the files from the above archive

6) Linux: change permissions of the jdbc_mysql_post_install script:

chmod a+x jdbc_mysql_post_install

7) Run the script:

Linux: jdbc_mysql_post_install 

Windows: jdbc_mysql_post_install.bat

The following example is from vApp:

<hostname> VAPP-14.3.0 (X.X.X.X):~ > cd /opt/CA/IdentityManager/ConnectorServer/jcs/resources/jdbc/
<hostname> VAPP-14.3.0 (X.X.X.X):/opt/CA/IdentityManager/ConnectorServer/jcs/resources/jdbc > unzip jdbc_mysql_post_install.zip
Archive:  jdbc_mysql_post_install.zip
  inflating: jdbcMysqlConnectorLibsOsgi.mf
  inflating: jdbc_mysql_post_install
  inflating: jdbc_mysql_post_install.bat
<hostname> VAPP-14.3.0 (X.X.X.X):/opt/CA/IdentityManager/ConnectorServer/jcs/resources/jdbc > chmod a+x jdbc_mysql_post_install
<hostname> VAPP-14.3.0 (X.X.X.X):/opt/CA/IdentityManager/ConnectorServer/jcs/resources/jdbc > ./jdbc_mysql_post_install

* ----------------------------------------------------------------------
* Provide location of required libraries
* ----------------------------------------------------------------------

Please provide the full path of a folder that contains this file:

      mysql-connector-java-5.0.8-bin.jar

/home/config/


* ----------------------------------------------------------------------
* Create JDBC MySQL OSGi fragment bundle
* ----------------------------------------------------------------------

Building fragment bundle with following options: [-manifestfile, /opt/CA/IdentityManager/ConnectorServer/jcs/resources/jdbc/jdbcMysqlConnectorLibsOsgi.mf, -fragmentjarname, /opt/CA/IdentityManager/ConnectorServer/jcs/resources/jdbc/jdbcMysqlConnectorLibsOsgi.jar, -jardir, /home/config/]
Created /opt/CA/IdentityManager/ConnectorServer/jcs/resources/jdbc/jdbcMysqlConnectorLibsOsgi.jar

The generated bundle fragment is now ready to be installed using the Connector Server Management UI.
/opt/CA/IdentityManager/ConnectorServer/jcs/resources/jdbc/jdbcMysqlConnectorLibsOsgi.jar

<hostname> VAPP-14.3.0 (X.X.X.X):/opt/CA/IdentityManager/ConnectorServer/jcs/resources/jdbc >

8) Copy resulting fragment bundle file jdbcMysqlConnectorLibsOsgi.jar to the machine/location where you can select it from Connector Server Console

9) Open Connector Server Console in your browser and logon using 'admin' user. URL:

http://<CS machine>:20080
or
https://<CS machine>:20443

10) Add a new bundle:

      - Select 'Bundles' tab
      - 'Bundles / + Add'
      - Browse to the location and select jdbcMysqlConnectorLibsOsgi.jar file
      - Select 'Local Connector Server' > 'OK':


      - New bundle 'JCS :: JDBC :: MySQL JDBC Driver v5.0.8' will appear, search for it and select it
      - Right click and invoke 'Refresh Imports' from popup menu.
        New bundle status will change from 'Installed' to 'Fragment (com.ca.jcs.jdbc)'

The Connector Server now has MySQL JDBC driver.

Attachments

1627533254382__jdbc_mysql_post_install.zip get_app