java.lang.ClassNotFoundException when calling/using a jdbc connection in a Jscript in Operational Bindings
search cancel

java.lang.ClassNotFoundException when calling/using a jdbc connection in a Jscript in Operational Bindings

book

Article ID: 57004

calendar_today

Updated On:

Products

CA Identity Manager CA Identity Governance CA Identity Portal CA Risk Analytics CA Secure Cloud SaaS - Arcot A-OK (WebFort) CLOUDMINDER ADVANCED AUTHENTICATION CA Secure Cloud SaaS - Advanced Authentication CA Secure Cloud SaaS - Identity Management CA Secure Cloud SaaS - Single Sign On

Issue/Introduction

In IM 12.6 the JCS was changed and is now using the OSGI bundle mechanism to load jdbc drivers such as Oracle, Sybase and Siebel.

The documentation explains how to build an OSGI bundle and does also explain that the relevant JDBC driver would need to be put manually into C:\Program Files (x86)\CA\Identity Manager\Connector Xpress\lib

 

 

Environment

Release:
Component: IDMGR

Resolution

In JCS you have the possibillity to write JS script in conjunction with Operation Bindings. Here you can basically write your own connector.

But if you are trying to access the jdbc driver with for example

java.lang.Class.forName( "com.sybase.jdbc3.jdbc.SybDriver" )

you will get

getJDBCConnection ERROR: java.lang.ClassNotFoundException: com.sybase.jdbc3.jdbc.SybDriver

in the endpoint log located in a subdirectory under C:\Program Files (x86)\CA\Identity Manager\Connector Server\jcs\logs

 

As far as I know, this is due to the jscript engine does not work well with OSGI.

To fix this, you would need to add the JDBC driver in question into C:\Program Files (x86)\CA\Identity Manager\Connector Server\lib

So for the error above, you would need to copy jconn3.jar to C:\Program Files (x86)\CA\Identity Manager\Connector Server\lib and restart the Java Connector service (Net stop im_jcs ; net start im_jcs)