org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.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]

Stack Overflow | RM Paul | 2 weeks ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0

    Spring Boot to start with Oracle Configuration

    Stack Overflow | 1 month ago | user3428736
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
  2. 0

    Configuring spring boot with hibernate spatial

    Stack Overflow | 2 years ago | PaaZ
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/engine/config/spi/StandardConverters
  3. 0
    samebug tip
    Check if you have started your server, or if your server is set to listen to the port you're trying to connect and is waiting to accept connections and check if the firewall isn't blocking your connection.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    Firewall might be blocking your connection, or MySQL it's not running on your server machine.
  6. 0

    Spring-Boot and MySql unable to connect

    Stack Overflow | 2 months ago | agata
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.hibernate.HibernateException

    Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set

    at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect()
  2. org.hibernate.engine
    JdbcEnvironmentInitiator.initiateService
    1. org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:100)[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    2. org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:54)[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    3. org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:137)[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    4. org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    4 frames
  3. org.hibernate.boot
    StandardServiceRegistryImpl.initiateService
    1. org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88)[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    1 frame
  4. Hibernate
    JdbcServicesImpl.configure
    1. org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:254)[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    2. org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:228)[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    3. org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:207)[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    4. org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:51)[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    4 frames
  5. org.hibernate.boot
    StandardServiceRegistryImpl.configureService
    1. org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94)[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    1 frame
  6. Hibernate
    AbstractServiceRegistryImpl.getService
    1. org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    2. org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:207)[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    2 frames
  7. org.hibernate.boot
    MetadataBuildingProcess.complete
    1. org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:352)[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    2. org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:111)[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    2 frames
  8. org.hibernate.jpa
    EntityManagerFactoryBuilderImpl.build
    1. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:847)[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]
    2. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:874)[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]
    2 frames
  9. Spring ORM
    AbstractEntityManagerFactoryBean.afterPropertiesSet
    1. org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:60)[spring-orm-4.3.8.RELEASE.jar:4.3.8.RELEASE]
    2. org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:353)[spring-orm-4.3.8.RELEASE.jar:4.3.8.RELEASE]
    3. org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:370)[spring-orm-4.3.8.RELEASE.jar:4.3.8.RELEASE]
    4. org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:359)[spring-orm-4.3.8.RELEASE.jar:4.3.8.RELEASE]
    4 frames
  10. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687)[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624)[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]
    5. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]
    6. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]
    7. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]
    8. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]
    8 frames
  11. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1081)[spring-context-4.3.8.RELEASE.jar:4.3.8.RELEASE]
    2. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:856)[spring-context-4.3.8.RELEASE.jar:4.3.8.RELEASE]
    3. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)[spring-context-4.3.8.RELEASE.jar:4.3.8.RELEASE]
    3 frames
  12. Spring Boot
    SpringApplication.run
    1. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]
    2. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737)[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]
    3. org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370)[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]
    4. org.springframework.boot.SpringApplication.run(SpringApplication.java:314)[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]
    5. org.springframework.boot.SpringApplication.run(SpringApplication.java:1162)[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]
    6. org.springframework.boot.SpringApplication.run(SpringApplication.java:1151)[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]
    6 frames
  13. hello
    Application.main
    1. hello.Application.main(Application.java:10)[classes/:na]
    1 frame