Package org.olat.core.logging

Examples of org.olat.core.logging.StartupException


      updateStmt.addBatch(lastUsageQuery);
      updateStmt.addBatch(repositoryLastUsageQuery);
      updateStmt.executeBatch();
    } 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. ", e);
      throw new StartupException("Could not execute system upgrade sql query. ", e);
    }

    uhd.setBooleanDataValue(TASK_INITIALIZE_LAST_LOGIN_DONE, true);

    log.audit("+------------------------------------------------------------------------------------+");
View Full Code Here


        con.close();
        con = null;

      } 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);
      }

      uhd.setBooleanDataValue(TASK_CLEAN_UP_OF_V2GUIPREFERENCES_DONE, true);

      log.audit("+---------------------------------------------------------------------------------------+");
View Full Code Here

      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.2.0 detected! Continue running upgrade for 5.2.0 ...", 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 '%ajax-beta-on</string>%<boolean>false%' " +
                   "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);
    }
  }
View Full Code Here

TOP

Related Classes of org.olat.core.logging.StartupException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.