Package org.springframework.jdbc

# Class CannotGetJdbcConnectionException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.dao.DataAccessException
org.springframework.dao.NonTransientDataAccessException
org.springframework.dao.NonTransientDataAccessResourceException
org.springframework.dao.DataAccessResourceFailureException
org.springframework.jdbc.CannotGetJdbcConnectionException

All Implemented Interfaces:
  `Serializable`

public class CannotGetJdbcConnectionException extends org.springframework.dao.DataAccessResourceFailureException
Fatal exception thrown when we can't connect to an RDBMS using JDBC.

Author:
  Rod Johnson, Juergen Hoeller
See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`CannotGetJdbcConnectionException(String msg)`
Constructor for `CannotGetJdbcConnectionException`.
`CannotGetJdbcConnectionException(String msg, IllegalStateException ex)`
Constructor for `CannotGetJdbcConnectionException`.
`CannotGetJdbcConnectionException(String msg, SQLException ex)`
Constructor for `CannotGetJdbcConnectionException`.

## Method Summary

### Methods inherited from class org.springframework.core.NestedRuntimeException

`contains, getMostSpecificCause, getRootCause`

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### CannotGetJdbcConnectionException

public CannotGetJdbcConnectionException(String msg)
Constructor for `CannotGetJdbcConnectionException`.

Parameters:
  `msg` - the detail message
Since:
  5.0

### CannotGetJdbcConnectionException

public CannotGetJdbcConnectionException(String msg, @Nullable SQLException ex)
Constructor for `CannotGetJdbcConnectionException`.

Parameters:
  `msg` - the detail message
  `ex` - the root cause SQLException

### CannotGetJdbcConnectionException

public CannotGetJdbcConnectionException(String msg, IllegalStateException ex)
Constructor for `CannotGetJdbcConnectionException`.

Parameters:
  `msg` - the detail message
  `ex` - the root cause IllegalStateException
Since:
  5.3.22