How to catch "Access to DialectResolutionInfo" exception

How to catch “Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set” exception ?

This is usually the case when the database connection details you configured are not correct or the database is not reachable. Depending on the environment you are running in, it might not be possible to catch this. This is thrown during EntityManagerFactory creation which usually happens at boot time. By setting a dialect explicitly, you can delay the exception caused by the fact, that no connection can be acquired.