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 :
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
Post a Comment