Tabnine Logo
JDBCConnectionException.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.hibernate.exception.JDBCConnectionException
constructor

Best Java code snippets using org.hibernate.exception.JDBCConnectionException.<init> (Showing top 14 results out of 315)

origin: hibernate/hibernate-orm

  || SQLNonTransientConnectionException.class.isInstance( sqlException )
  || SQLTransientConnectionException.class.isInstance( sqlException ) ) {
return new JDBCConnectionException( message, sqlException, sql );
origin: hibernate/hibernate-orm

return new JDBCConnectionException( message, sqlException, sql );
origin: gwenn/sqlite-dialect

  @Override
  public JDBCException convert(SQLException sqlException, String message, String sql) {
    final int errorCode = JdbcExceptionHelper.extractErrorCode( sqlException ) & 0xFF;
    if (errorCode == SQLITE_TOOBIG || errorCode == SQLITE_MISMATCH) {
      return new DataException( message, sqlException, sql );
    }
    else if (errorCode == SQLITE_BUSY || errorCode == SQLITE_LOCKED) {
      return new LockAcquisitionException( message, sqlException, sql );
    }
    else if ((errorCode >= SQLITE_IOERR && errorCode <= SQLITE_PROTOCOL) || errorCode == SQLITE_NOTADB) {
      return new JDBCConnectionException( message, sqlException, sql );
    }
    // returning null allows other delegates to operate
    return null;
  }
};
origin: org.hibernate/com.springsource.org.hibernate

  || SQLNonTransientConnectionException.class.isInstance( sqlException )
  || SQLTransientConnectionException.class.isInstance( sqlException ) ) {
return new JDBCConnectionException( message, sqlException, sql );
origin: org.hibernate.orm/hibernate-core

  || SQLNonTransientConnectionException.class.isInstance( sqlException )
  || SQLTransientConnectionException.class.isInstance( sqlException ) ) {
return new JDBCConnectionException( message, sqlException, sql );
origin: hibernate/hibernate

/**
 * Convert the given SQLException into Hibernate's JDBCException hierarchy.
 *
 * @param sqlException The SQLException to be converted.
 * @param message      An optional error message.
 * @param sql          Optionally, the sql being performed when the exception occurred.
 * @return The resulting JDBCException.
 */
public JDBCException convert(SQLException sqlException, String message, String sql) {
  String sqlStateClassCode = JDBCExceptionHelper.extractSqlStateClassCode( sqlException );
  if ( sqlStateClassCode != null ) {
    if ( SQL_GRAMMAR_CATEGORIES.contains( sqlStateClassCode ) ) {
      return new SQLGrammarException( message, sqlException, sql );
    }
    else if ( INTEGRITY_VIOLATION_CATEGORIES.contains( sqlStateClassCode ) ) {
      String constraintName = extracter.extractConstraintName( sqlException );
      return new ConstraintViolationException( message, sqlException, sql, constraintName );
    }
    else if ( CONNECTION_CATEGORIES.contains( sqlStateClassCode ) ) {
      return new JDBCConnectionException( message, sqlException, sql );
    }
  }
  return handledNonSpecificException( sqlException, message, sql );
}
origin: org.hibernate/com.springsource.org.hibernate.core

  || SQLNonTransientConnectionException.class.isInstance( sqlException )
  || SQLTransientConnectionException.class.isInstance( sqlException ) ) {
return new JDBCConnectionException( message, sqlException, sql );
origin: sensepost/yeti

  @Override
  public JDBCException convert(SQLException sqlException, String message, String sql) {
    final int errorCode = sqlException.getErrorCode();
    if (errorCode == SQLITE_CONSTRAINT) {
      final String constraintName = EXTRACTER.extractConstraintName(sqlException);
      return new ConstraintViolationException(message, sqlException, sql, constraintName);
    } else if (errorCode == SQLITE_TOOBIG || errorCode == SQLITE_MISMATCH) {
      return new DataException(message, sqlException, sql);
    } else if (errorCode == SQLITE_BUSY || errorCode == SQLITE_LOCKED) {
      return new LockAcquisitionException(message, sqlException, sql);
    } else if ((errorCode >= SQLITE_IOERR && errorCode <= SQLITE_PROTOCOL) || errorCode == SQLITE_NOTADB) {
      return new JDBCConnectionException(message, sqlException, sql);
    }
    return new GenericJDBCException(message, sqlException, sql);
  }
};
origin: org.hibernate/com.springsource.org.hibernate

return new JDBCConnectionException( message, sqlException, sql );
origin: org.hibernate/com.springsource.org.hibernate.core

return new JDBCConnectionException( message, sqlException, sql );
origin: jboss.jboss-embeddable-ejb3/hibernate-all

return new JDBCConnectionException( message, sqlException, sql );
origin: org.hibernate.orm/hibernate-core

return new JDBCConnectionException( message, sqlException, sql );
origin: hibernate/hibernate

/**
 * Convert the given SQLException into Hibernate's JDBCException hierarchy.
 *
 * @param sqlException The SQLException to be converted.
 * @param message      An optional error message.
 * @param sql          Optionally, the sql being performed when the exception occurred.
 * @return The resulting JDBCException.
 */
public JDBCException convert(SQLException sqlException, String message, String sql) {
  int errorCode = JDBCExceptionHelper.extractErrorCode( sqlException );
  if ( isMatch( getConnectionErrorCodes(), errorCode ) ) {
    return new JDBCConnectionException( message, sqlException, sql );
  }
  else if ( isMatch( getSQLGrammarErrorCodes(), errorCode ) ) {
    return new SQLGrammarException( message, sqlException, sql );
  }
  else if ( isMatch( getIntegrityViolationErrorCodes(), errorCode ) ) {
    String constraintName = extracter.extractConstraintName( sqlException );
    return new ConstraintViolationException( message, sqlException, sql, constraintName );
  }
  else if ( isMatch( getLockAcquisitionErrorCodes(), errorCode ) ) {
    return new LockAcquisitionException( message, sqlException, sql );
  }
  return handledNonSpecificException( sqlException, message, sql );
}
origin: com.atlassian.hibernate/hibernate.adapter

  return adaptInstantiationException((net.sf.hibernate.InstantiationException) ex);
if (ex instanceof net.sf.hibernate.exception.JDBCConnectionException)
  return new org.hibernate.exception.JDBCConnectionException(ex.getMessage(), getSQLExceptionFromThrowable(ex.getCause()));
if (ex instanceof net.sf.hibernate.exception.LockAcquisitionException)
  return new org.hibernate.exception.LockAcquisitionException(ex.getMessage(), getSQLExceptionFromThrowable(ex.getCause()));
org.hibernate.exceptionJDBCConnectionException<init>

Popular methods of JDBCConnectionException

    Popular in Java

    • Reactive rest calls using spring rest template
    • runOnUiThread (Activity)
    • orElseThrow (Optional)
      Return the contained value, if present, otherwise throw an exception to be created by the provided s
    • getContentResolver (Context)
    • BigDecimal (java.math)
      An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
    • Timestamp (java.sql)
      A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
    • SortedMap (java.util)
      A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
    • ExecutorService (java.util.concurrent)
      An Executor that provides methods to manage termination and methods that can produce a Future for tr
    • Executors (java.util.concurrent)
      Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
    • JComboBox (javax.swing)
    • Best plugins for Eclipse
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now