Top Description Fields Constructors Methods
org.springframework.jdbc

public Class InvalidResultSetAccessException

extends InvalidDataAccessResourceUsageException
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
java.sql.SQLException, org.springframework.dao.InvalidDataAccessResourceUsageException, org.springframework.lang.Nullable

Exception thrown when a ResultSet has been accessed in an invalid fashion. Such exceptions always have a java.sql.SQLException root cause.

This typically happens when an invalid ResultSet column index or name has been specified. Also thrown by disconnected SqlRowSets.

Author
Juergen Hoeller
Since
1.2
See Also
BadSqlGrammarException, org.springframework.jdbc.support.rowset.SqlRowSet

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
public
InvalidResultSetAccessException(String
name of current task
task
,
String
the offending SQL statement
sql
,
SQLException
the root cause
ex
)

Constructor for InvalidResultSetAccessException.

public
InvalidResultSetAccessException(SQLException
the root cause
ex
)

Constructor for InvalidResultSetAccessException.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the offending SQL, if known
getSql
()

Return the SQL that caused the problem.

public SQLException
getSQLException()

Return the wrapped SQLException.

Field Detail

sqlback to summary
private final String sql
Annotations
@Nullable

Constructor Detail

InvalidResultSetAccessExceptionback to summary
public InvalidResultSetAccessException(String task, String sql, SQLException ex)

Constructor for InvalidResultSetAccessException.

Parameters
task:String

name of current task

sql:String

the offending SQL statement

ex:SQLException

the root cause

InvalidResultSetAccessExceptionback to summary
public InvalidResultSetAccessException(SQLException ex)

Constructor for InvalidResultSetAccessException.

Parameters
ex:SQLException

the root cause

Method Detail

getSqlback to summary
public String getSql()

Return the SQL that caused the problem.

Returns:String

the offending SQL, if known

Annotations
@Nullable
getSQLExceptionback to summary
public SQLException getSQLException()

Return the wrapped SQLException.