ODI SDK 12c Creating Master Repository – Solving Errors

Initially, I followed various guides about adding the jar files to the build path, and used the JavaDoc documentation to write code to create a repository. Right away I got 1 error;

Exception in thread “main” java.lang.IllegalArgumentException: Could not load JDBC driver class [weblogic.jdbc.sqlserver.SQLServerDriver]Exception in thread “main” java.lang.IllegalArgumentException: Could not load JDBC driver class [weblogic.jdbc.sqlserver.SQLServerDriver] at oracle.odi.jdbc.datasource.DriverManagerDataSource.setDriverClassName(DriverManagerDataSource.java:178) at oracle.odi.jdbc.datasource.DriverManagerDataSource.<init>(DriverManagerDataSource.java:135) at oracle.odi.setup.support.OdiSchemaVersionUtil.<init>(OdiSchemaVersionUtil.java:129)

Fair enough, I guess I have to add a Jar for the connection type I’m using (In this case MS Sql Server) Though, google didn’t throw up much, Seems to be a fairly well protected driver.. Anyway, I must have it locally or at least on the ODI agent. In the end I used the JDBC driver exported from the WebLogic server (wlsqlserver.jar) which I found in “C:\Oracle\Middleware\Oracle_Home\oracle_common\modules\datadirect”

Seemed to do the trick, until the next error;

Error while updating Schema Version Registry Entry for ODI. Check if user has DBA permissions

This error was actually a bit misleading, whilst there obviously was an error updating the Schema Version Registry, it had nothing to do with DBA permissions, and also it was a complete failure to connect to the database, rather than updating the schema version. This was the exception message. At this point I was not printing a stack trace and only did that after exhausting other investigations. The stacktrace revealed a much more helpful error message;

java.sql.SQLException: [FMWGEN][SQLServer JDBC Driver]This driver is locked for use with embedded applications.

Interesting, and again a little bit misleading, I finally found that I also had to add 2 more Jar’s to the build path. Simply adding ‘weblogic.jar’ and ‘wlclient.jar’ to the build path, from the location C:\Oracle\Middleware\Oracle_Home\wlserver\server\lib resolved this error.

From this point I was able to successfully create a master repository;

Master repository creation started
Oct 03, 2017 11:48:57 AM oracle.odi.internal.util.OdiLogger info
INFO: New data source: [ODI_MASTER/*******@jdbc:weblogic:sqlserver://SERVER:1433;Databasename=ODI_MASTER]
Oct 03, 2017 11:49:03 AM oracle.ucp.common.UniversalConnectionPoolBase initInactiveConnectionTimeoutTimer
INFO: inactive connection timeout timer scheduled
Master repository creation successful
Elapsed Time in second : 1433