Package org.springframework.dao

Examples of org.springframework.dao.DataAccessResourceFailureException


            }
          }
        }
      }
      catch (Throwable ex) {
        throw new DataAccessResourceFailureException(
            "Could not register synchronization with JTA TransactionManager", ex);
      }
    }
  }
View Full Code Here


          return sessionFactory.openSession();
        }
      }
    }
    catch (HibernateException ex) {
      throw new DataAccessResourceFailureException("Could not open Hibernate Session", ex);
    }
  }
View Full Code Here

   * @see HibernateAccessor#convertHibernateAccessException
   * @see HibernateTransactionManager#convertHibernateAccessException
   */
  public static DataAccessException convertHibernateAccessException(HibernateException ex) {
    if (ex instanceof JDBCConnectionException) {
      return new DataAccessResourceFailureException(ex.getMessage(), ex);
    }
    if (ex instanceof SQLGrammarException) {
      SQLGrammarException jdbcEx = (SQLGrammarException) ex;
      return new InvalidDataAccessResourceUsageException(ex.getMessage() + "; SQL [" + jdbcEx.getSQL() + "]", ex);
    }
View Full Code Here

      Session session = SessionFactoryUtils.openSession(sessionFactory);
      session.setFlushMode(FlushMode.MANUAL);
      return session;
    }
    catch (HibernateException ex) {
      throw new DataAccessResourceFailureException("Could not open Hibernate Session", ex);
    }
  }
View Full Code Here

      Session session = SessionFactoryUtils.openSession(getSessionFactory());
      session.setFlushMode(FlushMode.MANUAL);
      return session;
    }
    catch (HibernateException ex) {
      throw new DataAccessResourceFailureException("Could not open Hibernate Session", ex);
    }
  }
View Full Code Here

   * @see HibernateExceptionTranslator#convertHibernateAccessException
   * @see HibernateTransactionManager#convertHibernateAccessException
   */
  public static DataAccessException convertHibernateAccessException(HibernateException ex) {
    if (ex instanceof JDBCConnectionException) {
      return new DataAccessResourceFailureException(ex.getMessage(), ex);
    }
    if (ex instanceof SQLGrammarException) {
      SQLGrammarException jdbcEx = (SQLGrammarException) ex;
      return new InvalidDataAccessResourceUsageException(ex.getMessage() + "; SQL [" + jdbcEx.getSQL() + "]", ex);
    }
View Full Code Here

      }
      catch (InvocationTargetException ex) {
        logger.error("Could not open Oracle LOB", ex.getTargetException());
      }
      catch (Exception ex) {
        throw new DataAccessResourceFailureException("Could not open Oracle LOB", ex);
      }
    }
  }
View Full Code Here

          logger.error("Could not close Oracle LOB", ex.getTargetException());
        }
      }
      catch (Exception ex) {
        if (temporary) {
          throw new DataAccessResourceFailureException("Could not free Oracle LOB", ex);
        }
        else {
          throw new DataAccessResourceFailureException("Could not close Oracle LOB", ex);
        }
      }
    }
  }
View Full Code Here

              "OracleLobCreator needs to work on [oracle.jdbc.OracleConnection], not on [" +
              con.getClass().getName() + "]: specify a corresponding NativeJdbcExtractor",
              ex.getTargetException());
        }
        else {
          throw new DataAccessResourceFailureException("Could not create Oracle LOB",
              ex.getTargetException());
        }
      }
      catch (Exception ex) {
        throw new DataAccessResourceFailureException("Could not create Oracle LOB", ex);
      }
    }
View Full Code Here

      }
      catch (InvocationTargetException ex) {
        logger.error("Could not free Oracle LOB", ex.getTargetException());
      }
      catch (Exception ex) {
        throw new DataAccessResourceFailureException("Could not free Oracle LOB", ex);
      }
    }
View Full Code Here

TOP

Related Classes of org.springframework.dao.DataAccessResourceFailureException

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.