Examples of DBRuntimeException


Examples of org.olat.core.logging.DBRuntimeException

          throw new AssertException("Try to close un-committed session");
        }
        hibernateSession.close();
      }
    } catch (HibernateException e) {
      throw new DBRuntimeException("Close Session error.", e);
    } catch (Exception e) {
      throw new DBRuntimeException("Error in dbsession.close: ", e);
    } finally {
      try {
        if (hibernateSession != null) {
          if (hibernateSession.isOpen())  hibernateSession.close();
        }
      } catch (Exception e) {
        // we did our best to close the hibernate session
        throw new DBRuntimeException("in finally of DBSession.java / closeSession(), closesession failed again ", e);
      }
    }
  }
View Full Code Here

Examples of org.olat.core.logging.DBRuntimeException

                  break;
              }
              session.close();
              logInfo("Transaction Level::::" + lev, null);
            } catch (SQLException e) {
              throw new DBRuntimeException("could not get TransactionIsolationLevel from db", e);
            }
          }
        }
        initializeSession();
        // else we have an DBSession in the current thread, but check if
View Full Code Here

Examples of org.olat.core.logging.DBRuntimeException

      } catch (Error er) {
        logError("Uncaught Error in DBImpl.commit.catch(Exception).", er);
        throw er;
      } catch (Exception ex) {
        logWarn("Could not rollback transaction after commit!", ex);
        throw new DBRuntimeException("rollback after commit failed", e);
      }
      throw new DBRuntimeException("commit failed, rollback transaction", e);
    }
  }
View Full Code Here

Examples of org.olat.core.logging.DBRuntimeException

        getTransaction().rollback();
        getData().handleRollback(this);
      }
    } catch (Exception ex) {
      logWarn("Could not rollback transaction!",ex);
      throw new DBRuntimeException("rollback failed", ex);
    }   
  }
View Full Code Here

Examples of org.olat.core.logging.DBRuntimeException

      }
      setInTransaction(false);
      this.committed = true;
    } catch (HibernateException e) {
      setErrorAndRollback(e);
      throw new DBRuntimeException("DB commit failed. Could not commit transaction: " + this , e);
    }
  }
View Full Code Here

Examples of org.olat.core.logging.DBRuntimeException

        // OLAT-3621: raising log level from WARN to ERROR to have this pop up in tests more. plus added a stacktrace for debugging ease.
        Tracing.logError("Could not call hibernateTransaction.rollback() because is not Active or already rolledback", new Exception("DBTransaction.rollback()"), this.getClass());
      }
      this.rolledBack = true;
    } catch (HibernateException e) {
      throw new DBRuntimeException("DB rollback transaction failed. ", e);
    }
  }
View Full Code Here

Examples of org.olat.core.logging.DBRuntimeException

      }
      return li;
    }
    catch (HibernateException he) {
      String msg ="Error in list()" ;
      throw new DBRuntimeException(msg, he);
    } finally {
      Codepoint.codepoint(getClass(), "list-exit", query);
    }
  }
View Full Code Here

Examples of org.olat.core.logging.DBRuntimeException

  public String[] getNamedParameters() {
    try {
      return query.getNamedParameters();
    }
    catch (HibernateException e) {
      throw new DBRuntimeException("GetNamedParameters failed. ", e);
   
  }
View Full Code Here

Examples of org.olat.core.logging.DBRuntimeException

   
    try {
      return query.getReturnTypes();
    }
    catch (HibernateException e) {
      throw new DBRuntimeException("GetReturnTypes failed. ", e);
    }
  }
View Full Code Here

Examples of org.olat.core.logging.DBRuntimeException

  public Iterator iterate() {
    try {
      return query.iterate();
    }
    catch (HibernateException e) {
      throw new DBRuntimeException("Iterate failed. ", e);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.