title: Spring Boot Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test
body: <p>I am using <strong>Eclipse</strong> Version: 2018-09 (4.9.0) and i have installed the 
  <strong>Spring Tool Suit(STS)</strong> in eclipse for building Spring Boot Applications.</p>
  
  <p><strong>Question</strong>->
  When ever I create new Spring Starter Project and try to maven build my project without any code addition. Build fails with below Error.</p>
  
  <pre><code>[WARNING] The requested profile "pom.xml" could not be activated because it does not exist.
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project DemoSpringProject: There are test failures.
  [ERROR] 
  [ERROR] Please refer to C:\Users\SP064774\Util-Workspace\DemoSpringProject\target\surefire-reports for the individual test results.
  [ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
  [ERROR] -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
  </code></pre>
  
  <p>If I remove the test folder which is having the default test. it work fine. But why this happens. Below folder is the one i deleted which generated by Spring boot project</p>
  
  <pre><code>src/test/java
  </code></pre>
  
  <p>Thanks in advance.</p>
  
  <p><strong>Update</strong></p>
  
  <p>Below is the default test file which get generated.</p>
  
  <pre><code>@RunWith(SpringRunner.class)
  @SpringBootTest
  public class DemoSpringProjectApplicationTests {
  
    @Test
    public void contextLoads() {
    }
  </code></pre>
  
  <p>}</p>
  
  <p>Log from the refered file. C:\Users\SP064774\Util-Workspace\DemoSpringProject\target\surefire-reports</p>
  
  <pre><code>--------------------------------------------------------------------
  Test set: com.example.demo.DemoSpringProjectApplicationTests
  -------------------------------------------------------------------------
  Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.473 s 
  
  FAILURE! - in com.example.demo.DemoSpringProjectApplicationTests
  contextLoads(com.example.demo.DemoSpringProjectApplicationTests)  Time 
  elapsed: 0.002 s  &lt;&lt;&lt; ERROR!
  java.lang.IllegalStateException: Failed to load ApplicationContext
  Caused by: 
  org.springframework.beans.factory.UnsatisfiedDependencyException: 
  Error creating bean with name 
  </code></pre>
  
  <p>'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration': 
      Unsatisfied dependency expressed through constructor parameter 0; nested 
      exception is org.springframework.beans.factory.BeanCreationException: 
      Error 
      creating bean with name 'dataSource' defined in class path resource 
      [org/springframework/boot/autoconfigure/jdbc/ 
      DataSourceConfiguration$Hikari .class]: Bean instantiation via factory 
      method failed; nested exception is 
      org.springframework.beans.BeanInstantiationException: Failed to 
      instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 
      'dataSource' threw exception; nested exception is 
      org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$ 
      DataSourceBeanCreationException: Failed to determine a suitable driver 
      class
      Caused by: org.springframework.beans.factory.BeanCreationException: Error 
      creating bean with name 'dataSource' defined in class path resource 
      [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$ 
      Hikari.class]: Bean instantiation via factory method failed; nested 
      exception is org.springframework.beans.BeanInstantiationException: Failed 
      to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 
      'dataSource' threw exception; nested exception is 
      org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$ 
      DataSourceBeanCreationException: Failed to determine a suitable driver 
      class
      Caused by: org.springframework.beans.BeanInstantiationException: Failed 
      to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method ' 
      dataSource' threw exception; nested exception is 
      org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$ 
      DataSourceBeanCreationException: Failed to determine a suitable driver 
      class
      Caused by: 
      org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$ 
      DataSourceBeanCreationException: Failed to determine a suitable driver 
      class</p>
  
  <p>POM.xml</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;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.1.1.RELEASE&lt;/version&gt;
      &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
  &lt;/parent&gt;
  &lt;groupId&gt;com.example&lt;/groupId&gt;
  &lt;artifactId&gt;DemoSpringProject&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  &lt;name&gt;DemoSpringProject&lt;/name&gt;
  &lt;description&gt;Demo project for Spring Boot&lt;/description&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;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-integration&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;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;com.h2database&lt;/groupId&gt;
          &lt;artifactId&gt;h2&lt;/artifactId&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;
  </code></pre>
  
  <p></p>