title: Spring Boot - Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
body: <p>I am running a spring boot application that should connect to a database using hibernate, however I am getting the following exception: <code>Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set</code></p>
  <p>My application.properties</p>
  <pre><code>server.port=9000
  spring.datasource.url=jdbc:mysql://localhost/Users
  spring.datasource.driverClassName=com.mysql.jdbc.Driver
  spring.datasource.username=root
  spring.datasource.password=root
  </code></pre>
  <p>Here is my pom.xml</p>
  <pre><code>&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.1.9.RELEASE&lt;/version&gt;
  &lt;/parent&gt;
  &lt;properties&gt;
      &lt;spring.boot.version&gt;1.1.8.RELEASE&lt;/spring.boot.version&gt;
      &lt;start.class&gt;com.server.boot.Starter&lt;/start.class&gt;
      &lt;spring.core.version&gt;4.0.6.RELEASE&lt;/spring.core.version&gt;
      &lt;log4j.version&gt;1.2.17&lt;/log4j.version&gt;
      &lt;tomcat.version&gt;8.0.8&lt;/tomcat.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-web&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
          &lt;version&gt;${spring.core.version}&lt;/version&gt;
      &lt;/dependency&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;mysql&lt;/groupId&gt;
          &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  <p>My configuration class:</p>
  <pre><code>@Configuration
  @ComponentScan({&quot;com.server&quot;})
  @EnableAutoConfiguration
  public class Starter {
      public static void main(String[] args){
          SpringApplication.run(Starter.class,args);
          System.out.println(&quot;started application&quot;);
      }   
      @Bean
      public LoginController loginController(){
          return new LoginController();
      }   
  }
  </code></pre>
  <p>And my controller:</p>
  <pre><code>@Service
  @Transactional
  @RestController
  @RequestMapping(&quot;/user&quot;)
  public class LoginController {
      
      @PersistenceContext
      private EntityManager entityManager;
      
      @RequestMapping(value=&quot;/login&quot;,method=RequestMethod.POST)
      public String login(@RequestParam(value=&quot;username&quot;,required=true) String username, 
                          @RequestParam(value=&quot;password&quot;,required=true) String password){
          return &quot;Tried to login as &quot;+username + &quot; where em is &quot;+entityManager;
      }
  }
  </code></pre>
  <p>What is the cause of this?</p>
  <hr />
  <p>Upon further research</p>
  <p>I believe the answer to this question <a href="https://stackoverflow.com/questions/26548505/org-hibernate-hibernateexception-access-to-dialectresolutioninfo-cannot-be-null">org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when &#39;hibernate.dialect&#39; not set</a> solved it</p>