static void initDrivers ( final Config config ) throws InitializationException { for ( String driverName : uniquePrefixSet ( config ) ) { Config driverConfig = config . getObject ( driverName ) . toConfig ( ) ; if ( driverConfig . hasPath ( "class" ) ) { String className = driverConfig . getString ( "class" ) ; try { Class . forName ( className ) ; } catch ( Throwable t ) { throw new InitializationException ( "Unable to load JDBC driver, '" + className + "'" , t ) ; } } else { throw new InitializationException ( "A 'class' must be specified for JDBC driver, '" + driverName + "'" ) ; } } }
Initialize JDBC drivers from config .