title: Error creating bean with name 'entityManagerFactory' spring boot application
body: <p>When I compile my spring boot project, got the following error.</p>
  
  <blockquote>
    <p>org.springframework.beans.factory.BeanCreationException: Error
    creating bean with name 'entityManagerFactory' defined in class path
    resource
    [com/biganalytics/project/configuration/JpaConfiguration.class]: Bean
    instantiation via factory method failed; nested exception is
    org.springframework.beans.BeanInstantiationException: Failed to
    instantiate
    [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]:
    Factory method 'entityManagerFactory' threw exception; nested
    exception is java.lang.IllegalStateException: required key
    [datasource.sampleapp.hibernate.dialect] not found    at
    org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
    ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]   at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)
    ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]   at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)
    ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]   at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
    ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]   at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
    ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]   at
    org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]   at
    org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]   at
    org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]   at
    org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]   at
    org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1081)
    ~[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]     at
    org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:856)
    ~[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]     at
    org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
    ~[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]     at
    org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
    ~[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]    at
    org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737)
    [spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]     at
    org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370)
    [spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]     at
    org.springframework.boot.SpringApplication.run(SpringApplication.java:314)
    [spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]     at
    org.springframework.boot.SpringApplication.run(SpringApplication.java:1162)
    [spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]     at
    org.springframework.boot.SpringApplication.run(SpringApplication.java:1151)
    [spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]     at
    com.biganalytics.project.WebApplication.main(WebApplication.java:19)
    [classes/:na] Caused by:
    org.springframework.beans.BeanInstantiationException: Failed to
    instantiate
    [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]:
    Factory method 'entityManagerFactory' threw exception; nested
    exception is java.lang.IllegalStateException: required key
    [datasource.sampleapp.hibernate.dialect] not found    at
    org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
    ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]   at
    org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
    ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]   ... 18 common frames
    omitted Caused by: java.lang.IllegalStateException: required key
    [datasource.sampleapp.hibernate.dialect] not found    at
    org.springframework.core.env.AbstractPropertyResolver.getRequiredProperty(AbstractPropertyResolver.java:183)
    ~[spring-core-4.3.6.RELEASE.jar:4.3.6.RELEASE]    at
    org.springframework.core.env.AbstractEnvironment.getRequiredProperty(AbstractEnvironment.java:556)
    ~[spring-core-4.3.6.RELEASE.jar:4.3.6.RELEASE]    at
    com.biganalytics.project.configuration.JpaConfiguration.jpaProperties(JpaConfiguration.java:99)
    ~[classes/:na]    at
    com.biganalytics.project.configuration.JpaConfiguration.entityManagerFactory(JpaConfiguration.java:81)
    ~[classes/:na]    at
    com.biganalytics.project.configuration.JpaConfiguration$$EnhancerBySpringCGLIB$$5f74f23d.CGLIB$entityManagerFactory$1()
    ~[classes/:na]    at
    com.biganalytics.project.configuration.JpaConfiguration$$EnhancerBySpringCGLIB$$5f74f23d$$FastClassBySpringCGLIB$$6189aa41.invoke()
    ~[classes/:na]    at
    org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
    ~[spring-core-4.3.6.RELEASE.jar:4.3.6.RELEASE]    at
    org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)
    ~[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]     at
    com.biganalytics.project.configuration.JpaConfiguration$$EnhancerBySpringCGLIB$$5f74f23d.entityManagerFactory()
    ~[classes/:na]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
    Method) ~[na:1.8.0_112]   at
    sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    ~[na:1.8.0_112]   at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    ~[na:1.8.0_112]   at java.lang.reflect.Method.invoke(Unknown Source)
    ~[na:1.8.0_112]   at
    org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
    ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]   ... 19 common frames
    omitted</p>
  </blockquote>
  
  <p>Can help please</p>