Question: no exception of type dataaccessexception can be thrown an exception type must be a subclass of?
Answer: This can happen if some class in the type-hierarchy of the exception is not on the class-path. ... Your DataAccessException is not a subclass of Throwable class (extends Throwable). It should be, and without this inheritance, your code is not compilable with the current throws clause.