Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public class DataAccessException
- Object
- Throwable
- Exception
- IOException
- DataAccessException
A database operation failed: a statement the engine refused, a connection that could not be opened or was lost, a query that returned more rows than one.
Named after Spring’s, and treated the same way by @Transactional:
it rolls the transaction back although it is a checked exception. Spring’s
rule is that unchecked exceptions roll back and checked ones commit, and in
Spring a failed statement rolls back because its JDBC layer throws the
unchecked DataAccessException. This runtime’s data methods declare
IOException, so their failures are this subtype of it, and the build’s
rollback rule lists it beside RuntimeException and Error. A
plain IOException of the application’s own – a file it could not
read – still commits, as in Spring; rollbackFor and
noRollbackFor change either.
Constructors
public DataAccessException(String message) | |
public DataAccessException(String message, Throwable cause) |
Inherited methods
Constructor details
DataAccessException
public DataAccessException(String message)DataAccessException
public DataAccessException(String message, Throwable cause)