title: Spring boot data jpa APPLICATION FAILED TO START
body: <p>I learn JPA from <a href="https://spring.io/guides/gs/accessing-data-jpa/#initial" rel="nofollow noreferrer">https://spring.io/guides/gs/accessing-data-jpa/#initial</a> and git clone project</p>
  
  <p>I did a java file following this example but it is still error.
  How can I fix it?</p>
  
  <h2>-----------</h2>
  
  <h2>-----------</h2>
  
  <p>Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
  2018-06-09 16:41:37.706 ERROR 18872 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : </p>
  
  <hr>
  
  <p>APPLICATION FAILED TO START</p>
  
  <hr>
  
  <p>Description:</p>
  
  <p>Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.</p>
  
  <p>Reason: Failed to determine a suitable driver class</p>
  
  <p>Action:</p>
  
  <p>Consider the following:
      If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
      If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).</p>
  
  <h2>---------</h2>
  
  <h2>---------</h2>
  
  <pre><code>pom.xml file
  </code></pre>
  
  <p>
  http://maven.apache.org/maven-v4_0_0.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      4.0.0</p>
  
  <pre><code>&lt;groupId&gt;org.springframework&lt;/groupId&gt;
  &lt;artifactId&gt;gs-accessing-data-jpa&lt;/artifactId&gt;
  &lt;version&gt;0.1.0&lt;/version&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;2.0.2.RELEASE&lt;/version&gt;
  &lt;/parent&gt;
  
  &lt;properties&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;com.h2database&lt;/groupId&gt;
          &lt;artifactId&gt;h2&lt;/artifactId&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;/dependencies&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  
  &lt;repositories&gt;
      &lt;repository&gt;
          &lt;id&gt;spring-releases&lt;/id&gt;
          &lt;name&gt;Spring Releases&lt;/name&gt;
          &lt;url&gt;https://repo.spring.io/libs-release&lt;/url&gt;
      &lt;/repository&gt;
      &lt;repository&gt;
          &lt;id&gt;org.jboss.repository.releases&lt;/id&gt;
          &lt;name&gt;JBoss Maven Release Repository&lt;/name&gt;
          &lt;url&gt;https://repository.jboss.org/nexus/content/repositories/releases&lt;/url&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  
  &lt;pluginRepositories&gt;
      &lt;pluginRepository&gt;
          &lt;id&gt;spring-releases&lt;/id&gt;
          &lt;name&gt;Spring Releases&lt;/name&gt;
          &lt;url&gt;https://repo.spring.io/libs-release&lt;/url&gt;
      &lt;/pluginRepository&gt;
  &lt;/pluginRepositories&gt;
  </code></pre>
  
  <p></p>