If an error occurs during connection creation, an UnknownServiceException can be thrown if the JdbcServices implementation hasn't been registered yet. This hides the actual exception in BasicConnectionCreator.convertSqlException:
The simplest solution seems to be to make UnknownServiceException extend ServiceException (instead of HibernateException). |