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

Document ID : KB000057004
Show Technical Document Details

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

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)