No exception of type DataAccessException can be thrown; an exception type must be a subclass of Throwable

前端 未结 5 898
旧巷少年郎
旧巷少年郎 2021-01-17 13:42

My source code like below. It has a error, \"No exception of type DataAccessException can be thrown; an exception type must be a subclass of Throwable\".

I can\'t un

5条回答
  •  长发绾君心
    2021-01-17 14:12

    I was facing same problem. What I have done wrong was I have created Exception class(by mistake) of my own. In other programs I was trying to extend Exception class(default) but complier(eclipse)was loading user defined Exception class giving me same error. So please make sure you are not overriding any default class.

提交回复
热议问题