title: Error creating bean with name 'entityManagerFactory' defined in class path resource - invocation of init method failed
body: <p>I Keep getting this same issue running my Spring Boot project, trying to connect to MySQL using Spring Data JPA.  It says something about "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]".  Not sure what that means.  Tried looking at other answered questions on here but couldn't figure it out.  Any ideas?</p>
  
  <p>The error is:</p>
  
  <pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean 
  with name 'entityManagerFactory' defined in class path 
  resource[org/springframework/boot/autoconfigure/orm/jpa/
  HibernateJpaAutoConfigura ion.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]
  </code></pre>
  
  <p>Says Caused by:</p>
  
  <pre><code>Caused by: org.hibernate.service.spi.ServiceException: Unable to create 
  requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
  
  Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo 
  cannot be null when 'hibernate.dialect' not set
  </code></pre>
  
  <p>My pom.xml file is:</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;project xmlns="http://maven.apache.org/POM/4.0.0" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
      http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
  &lt;name&gt;&lt;/name&gt;
  &lt;description&gt;project for Spring Boot&lt;/description&gt;
  
  &lt;parent&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
      &lt;version&gt;1.5.4.RELEASE&lt;/version&gt;
      &lt;relativePath/&gt;
  &lt;/parent&gt;
  
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
      &lt;java.version&gt;1.8&lt;/java.version&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-devtools&lt;/artifactId&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;mysql&lt;/groupId&gt;
          &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;jstl&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.tomcat.embed&lt;/groupId&gt;
          &lt;artifactId&gt;tomcat-embed-jasper&lt;/artifactId&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p></p>
  
  <p>also, my application.properties:</p>
  
  <pre><code>spring.datasource.url=jdbc:mysql://localhost:3306/&lt;&lt;projectname&gt;&gt;
  spring.datasource.username=root
  spring.datasource.password=
  spring.datasource.driver-class-name=com.mysql.jdbc.Driver
  spring.jpa.hibernate.ddl-auto=update
  
  spring.mvc.view.prefix=/WEB-INF/
  spring.mvc.view.suffix=.jsp
  </code></pre>