AnsweredAssumed Answered

JDBC driver location for GEL in custom actions

Question asked by Mike.M on Jun 29, 2011
Latest reply on Jul 5, 2011 by fpena
Hi all,

I've tried my first attept at using GEL in a custom script action, and it seems to be having an issue with the JDBC driver I'm trying to call. From the XML Open Gateway Developer Guide:
Note that the GEL engine does not search the environment path for these files. GEL only looks in the lib folder (and the CA Clarity PPM server classpath, if it has been installed on the local computer). For Oracle, ojdbc14.jar should be copied to the lib folder. For SQLServer, Microsoft’s JDBC drivers must be made available to the GEL engine. Copy the files msbase.jar, mssqlserver.jar, and msutil.jar to the lib directory (after you have installed the latest JDBC driver from Microsoft, or copy the files from CA Clarity PPM.
The following example connects to a CA Clarity PPM database and prints out the results of a basic query.

<gel:script xmlns:core="jelly:core"
xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
xmlns:sql="jelly:sql">
<gel:parameter default="svong" var="ClarityUser"/>
<gel:parameter default="svong" secure="true" var="ClarityPassword"/>
<sql:setDataSource url="jdbc:oracle:thin:@localhost:1521:NIKU" driver="oracle.jdbc.driver.OracleDriver"

...



I originally used the oracle.jdbc.driver.OracleDriver that is mentioned in the guide and found that the action failed as it couldn't find that particular driver (invalid driver class name). After further research, I found that since our Clarity installation is deployed in a WebSphere environment, the driver is actually supposed to be com.ca.clarity.jdbcx.oracle.OracleDataSource (page 169 of the Installation Guide).

Now, I'm getting the following error when I try to execute the action: Unable to get connection, DataSource invalid: "No suitable driver found for jdbc:oracle:thin:@localhost:<port>:<service-name>" (The DB is on the same server as the application).

I asked if the ojdbc14.jar file had been put in the server classpath, and it hadn't however the install guide instructions mentioned putting the c-oracle.jar file in the JDBC driver path (with no mention of the ojdbc14.jar file anywhere in the install guide). Do we also need to put the ojdbc14.jar file somewhere on the server?

Outcomes