Problem :

I want to run the spring-boot application which uses the hibernate via spring-jpa, but I am facing the below error:

Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect( org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect( org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(

I need your help, thanks

Solution :

I also faced the similar issue in the recent past. And it was due to a invalid password provided. Also, I would like to say that your code seems to be very old-style code using the spring. You have already mentioned that you are trying to use the spring boot, which clearly means most of your things will be completely auto configured for you. The Hibernate dialect will also be auto selected based on your DB driver available on your classpath along with your valid credentials which can also be used to test your connection properly. If there is any issue with your connection then you will have to again face your same error. So you only need Three properties in your

# Replace with the valid connection string
# Replace with the valid credentials

If you follow the above approach properly then you will be able to resolve your issue with minimum effort on your side.

Another Solution:

First remove all of your configuration Spring Boot will begin it for you. In case you truly require a SessionFactory instead of an EntityManagerFactory include a HibernateJpaSessionFactoryBean.

Ensure that you have an in your classpath and include the following properties.



In case you truly require access to a SessionFactory and that is originally for a similar data source, then you can do the following (which is further documented here although for XML, not JavaConfig).

public class HibernateConfig {

    public HibernateJpaSessionFactoryBean sessionFactory(EntityManagerFactory emf) {
         HibernateJpaSessionFactoryBean factory = new HibernateJpaSessionFactoryBean();
         return factory;

In that method you have both an EntityManagerFactory and a SessionFactory.

Pretending you have a class with a main method with @EnableAutoConfiguration you don't require the @EnableTransactionManagement annotation, as that will be enabled by Spring Boot for you. A basic application class in the package must be enough.

public class Application {

    public static void main(String[] args) throws Exception {, args);


Something like that must be enough to have all your classes (together with entities and Spring Data based repositories) detected.

I would also point out removing the commons-dbcp dependency as that would approve Spring Boot to configure the faster and more robust HikariCP implementation.

Including the following line to the properties file solve this problem at the time I had that error



More Posts

Error creating bean with name 'entitymanagerfactory' defined in class path resource Alecxe01 - Nov 14
Could not get constructor for org.hibernate.persister.entity.singletableentitypersister Alecxe01 - Nov 14
Hibernate - Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1 Sabbir Hossain - Mar 31
Org.hibernate.exception.sqlgrammarexception: could not execute statement kesav.eee - Jun 14
'mvn' is not recognized as an internal or external command, operable program or batch file. Alecxe01 - Nov 6
Error: could not find or load main class org.codehaus.plexus.classworlds.launcher.launcher Alecxe01 - Oct 30
Org.hibernate.hibernateexception: no session found for current thread kesav.eee - Jun 14
Can we have multiple sessionfactory in hibernate kesav.eee - Jun 1
web server failed to start. port 8080 was already in use. SharadMagar450 - Aug 31 invalid cen header (bad signature) SharadMagar450 - Jul 31