java - Is it possible to receive URL from DataAccessException in hibernate spring? -


i use spring hibernate framework , in catch query update receive

dataaccessexception 

for write in error log receive url of database, sql error etc. possible receive dataaccessexception type? thanks.

there sources of dataaccessexception, methods defined, wrapper on exception, there nothing see. take consideration, not exception database may throw, should other exceptions, such jdbcexception.

the things need can still retrieved:

  1. get sql error via ex.getmessage();
  2. get database url hibernate session.
  3. show real query sql using hibernate.

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c++ - Using OpenSSL in a multi-threaded application -

All overlapping substrings matching a java regex -