Package org.hibernate

Class JDBCException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ConstraintViolationException, DataException, GenericJDBCException, JDBCConnectionException, LockAcquisitionException, PessimisticLockException, QueryTimeoutException, SQLGrammarException

public class JDBCException extends HibernateException
Wraps an SQLException. Indicates that an exception occurred during a JDBC call.
See Also:
  • Constructor Details

  • Method Details

    • getSQLState

      public String getSQLState()
      Get the SQLState of the underlying SQLException.
      Returns:
      String
      See Also:
    • getErrorCode

      public int getErrorCode()
      Get the errorCode of the underlying SQLException.
      Returns:
      int the error code
      See Also:
    • getSQLException

      public SQLException getSQLException()
      Get the underlying SQLException.
      Returns:
      SQLException
    • getSQL

      public String getSQL()
      Get the actual SQL statement that caused the exception (may be null)