Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]:

 Error:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]

org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [org.hibernate.dialect.MYSQL5InnoDBDialect] as strategy [org.hibernate.dialect.Dialect]




in my case, it was caused by this 

spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MYSQL5InnoDBDialect

instead of that you may use

spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect


The difference between MYSQL5InnoDBDialect and MYSQL5Dialect can be found by referring to this link :

https://stackoverflow.com/questions/4368195/hibernate-whats-the-difference-between-mysqldialect-and-mysqlinnodbdialect/4373777


or else you might have to include these dependencies to pom.xml


        <dependency>

    <groupId>org.hibernate</groupId>

    <artifactId>hibernate-entitymanager</artifactId>

    <version>5.3.9.Final</version>

</dependency>

<dependency>

    <groupId>org.hibernate</groupId>

    <artifactId>hibernate-core</artifactId>

    <version>5.4.32.Final</version>

</dependency>




Comments

Popular posts from this blog

"status": 404, "error": "not found", "message": "no message available", "path": "/api/employee"

There was an unexpected error (type=Not Found, status=404). No message available in Springboot