For those of you who cannot solve the problem based on the above solution, sometimes it seems that hibernate (depending on the version I'm using 3) is actually throwing the wrong error, for example, the problem may be present if you make a syntax error in sleep q language:
find("from Student s where s.id = :id")
change this to:
find("from Student s where s.id = ?")
actually solved this problem. I assume that my main point is that you should also look at your syntax for the bc problem, which seems to be hibernate may incorrectly mark this exception.
Jolly1234
source share