We have a Groovy script built to call a stored procedure in a DB2 (AS400) database. The code cannot instantiate the driver class on the atom when executing the script. A run time exception is thrown on this line: Class.forName("com.ibm.as400.access.AS400JDBCDriver"). We have a standard database connector that uses the same class and connection string that works fine but the script does not work. I suspect that it cannot find the Jar file which is located under <atom install dir>/userlib/database/. Does the Jar file need to be in a different place for the script to load it, and if so where?
Exception throw is of type ClassNotFoundException with a value of "com.ibm.as400.access.AS400JDBCDriver".
String message = "";
Connection conn = null;
CallableStatement stmt = null;
ResultSet rs = null;
// Retrieve a handle to the Logger
Logger logger = ExecutionUtil.getBaseLogger();
// Connect to iSeries
logger.fine("About to validate the driver class name");
// Exception thrown on above line and cannot load the driver class
....rest of code