Statement selectStmt = con.createStatement();
selectStmt.executeQuery(checkVersionQuery);
return;
} catch (ClassNotFoundException e) {
log.warn("Could not load jdbc driver for database configured in olat_config.xml. Driver: "+ driverClass, e);
throw new StartupException("Could not load jdbc driver for database configured in olat_config.xml. Driver: "+ driverClass, e);
} catch (SQLException e){
log.warn("Version before 5.1.1 detected! Continue running upgrade for 5.1.1 ...", e);
}
String query = "select u.firstname, u.lastname, u.email from o_property as p, o_bs_identity as i, o_user as u " +
"where p.name = 'v2guipreferences' " +
"and p.textvalue like '%<int>2_</int>%' " +
"and p.identity = i.id " +
"and i.fk_user_id = u.user_id;";
try {
Class.forName(driverClass);
Connection con = DriverManager.getConnection(dbUrl, username, password);
Statement selectStmt = con.createStatement();
ResultSet res = selectStmt.executeQuery(query);
while (res.next()){
log.audit(res.getString(1)+", "+res.getString(2)+", "+res.getString(3)+" ");
}
} catch (ClassNotFoundException e) {
log.warn("Could not load jdbc driver for database configured in olat_config.xml. Driver: "+ driverClass, e);
throw new StartupException("Could not load jdbc driver for database configured in olat_config.xml. Driver: "+ driverClass, e);
} catch (SQLException e) {
log.warn("Could not execute system upgrade sql query. Query:"+ query, e);
throw new StartupException("Could not execute system upgrade sql query. Query:"+ query, e);
}
}