title: Mongo Http Configuration Class not found Error
body: <p>The project is based on PetClinic . The data connects from the HANA DB and it works fine(creating tables,insert data).When I do Maven Install I am getting the following error where I am not using MongoDB. How to exclude/resolve this this. </p>
  
  <p><strong>Trace:</strong></p>
  
  <pre><code>    -------------------------------------------------------------------------------
  Test set: org.springframework.samples.petclinic.system.ProductionConfigurationTests
  -------------------------------------------------------------------------------
  Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 8.968 s &lt;&lt;&lt; FAILURE! - in org.springframework.samples.petclinic.system.ProductionConfigurationTests
  testFindAll(org.springframework.samples.petclinic.system.ProductionConfigurationTests)  Time elapsed: 0.007 s  &lt;&lt;&lt; ERROR!
  java.lang.IllegalStateException: Failed to load ApplicationContext
  Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [org.springframework.boot.test.context.ImportsContextCustomizer$ImportsConfiguration]; nested exception is java.io.FileNotFoundException: class path resource [org/springframework/session/data/mongo/config/annotation/web/http/MongoHttpSessionConfiguration.class] cannot be opened because it does not exist
  Caused by: java.io.FileNotFoundException: class path resource [org/springframework/session/data/mongo/config/annotation/web/http/MongoHttpSessionConfiguration.class] cannot be opened because it does not exist
  </code></pre>
  
  <p><strong>POM.XML</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://maven.apache.org/POM/4.0.0"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;org.springframework.samples&lt;/groupId&gt;
    &lt;artifactId&gt;spring-petclinic&lt;/artifactId&gt;
    &lt;version&gt;2.0.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.0.BUILD-SNAPSHOT&lt;/version&gt;
    &lt;/parent&gt;
    &lt;name&gt;petclinic&lt;/name&gt;
  
    &lt;properties&gt;
  
      &lt;!-- Generic properties --&gt;
      &lt;java.version&gt;1.8&lt;/java.version&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;!-- Web dependencies --&gt;
      &lt;webjars-bootstrap.version&gt;3.3.6&lt;/webjars-bootstrap.version&gt;
      &lt;webjars-jquery-ui.version&gt;1.11.4&lt;/webjars-jquery-ui.version&gt;
      &lt;webjars-jquery.version&gt;2.2.4&lt;/webjars-jquery.version&gt;
      &lt;wro4j.version&gt;1.8.0&lt;/wro4j.version&gt;
  
      &lt;cobertura.version&gt;2.7&lt;/cobertura.version&gt;
  
    &lt;/properties&gt;
  
    &lt;dependencies&gt;
      &lt;!-- Spring and Spring Boot dependencies --&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.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter-cache&lt;/artifactId&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;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-thymeleaf&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;!-- Databases - Uses HSQL by default --&gt;
  
       &lt;dependency&gt;
          &lt;groupId&gt;com.sap.db.jdbc&lt;/groupId&gt;  
          &lt;artifactId&gt;ngdbc&lt;/artifactId&gt;
          &lt;version&gt;2.1.3&lt;/version&gt;
           &lt;scope&gt;runtime&lt;/scope&gt;
       &lt;/dependency&gt; 
  
      &lt;!-- caching --&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;javax.cache&lt;/groupId&gt;
        &lt;artifactId&gt;cache-api&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.ehcache&lt;/groupId&gt;
        &lt;artifactId&gt;ehcache&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;!-- webjars --&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.webjars&lt;/groupId&gt;
        &lt;artifactId&gt;webjars-locator&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.webjars&lt;/groupId&gt;
        &lt;artifactId&gt;jquery&lt;/artifactId&gt;
        &lt;version&gt;${webjars-jquery.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.webjars&lt;/groupId&gt;
        &lt;artifactId&gt;jquery-ui&lt;/artifactId&gt;
        &lt;version&gt;${webjars-jquery-ui.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.webjars&lt;/groupId&gt;
        &lt;artifactId&gt;bootstrap&lt;/artifactId&gt;
        &lt;version&gt;${webjars-bootstrap.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- end of webjars --&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;/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;executions&gt;
            &lt;execution&gt;
              &lt;!-- Spring Boot Actuator displays build-related information
                if a META-INF/build-info.properties file is present --&gt;
              &lt;goals&gt;
                &lt;goal&gt;build-info&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                &lt;additionalProperties&gt;
                  &lt;encoding.source&gt;${project.build.sourceEncoding}&lt;/encoding.source&gt;
                  &lt;encoding.reporting&gt;${project.reporting.outputEncoding}&lt;/encoding.reporting&gt;
                  &lt;java.source&gt;${maven.compiler.source}&lt;/java.source&gt;
                  &lt;java.target&gt;${maven.compiler.target}&lt;/java.target&gt;
                &lt;/additionalProperties&gt;
              &lt;/configuration&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
          &lt;artifactId&gt;cobertura-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.7&lt;/version&gt;
          &lt;configuration&gt;
            &lt;check /&gt;
          &lt;/configuration&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;goals&gt;
                &lt;goal&gt;clean&lt;/goal&gt;
                &lt;goal&gt;check&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
        &lt;/plugin&gt;
  
        &lt;!-- Spring Boot Actuator displays build-related information if a git.properties
          file is present at the classpath --&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;pl.project13.maven&lt;/groupId&gt;
          &lt;artifactId&gt;git-commit-id-plugin&lt;/artifactId&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;goals&gt;
                &lt;goal&gt;revision&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
          &lt;configuration&gt;
            &lt;verbose&gt;true&lt;/verbose&gt;
            &lt;dateFormat&gt;yyyy-MM-dd'T'HH:mm:ssZ&lt;/dateFormat&gt;
            &lt;generateGitPropertiesFile&gt;true&lt;/generateGitPropertiesFile&gt;
            &lt;generateGitPropertiesFilename&gt;${project.build.outputDirectory}/git.properties
            &lt;/generateGitPropertiesFilename&gt;
            &lt;failOnNoGitDirectory&gt;false&lt;/failOnNoGitDirectory&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
  
        &lt;plugin&gt;
          &lt;groupId&gt;ro.isdc.wro4j&lt;/groupId&gt;
          &lt;artifactId&gt;wro4j-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;${wro4j.version}&lt;/version&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;phase&gt;generate-resources&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;run&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
          &lt;configuration&gt;
            &lt;wroManagerFactory&gt;ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory&lt;/wroManagerFactory&gt;
            &lt;cssDestinationFolder&gt;${project.build.directory}/classes/static/resources/css&lt;/cssDestinationFolder&gt;
            &lt;wroFile&gt;${basedir}/src/main/wro/wro.xml&lt;/wroFile&gt;
            &lt;extraConfigFile&gt;${basedir}/src/main/wro/wro.properties&lt;/extraConfigFile&gt;
            &lt;contextFolder&gt;${basedir}/src/main/less&lt;/contextFolder&gt;
          &lt;/configuration&gt;
          &lt;dependencies&gt;
            &lt;dependency&gt;
              &lt;groupId&gt;org.webjars&lt;/groupId&gt;
              &lt;artifactId&gt;bootstrap&lt;/artifactId&gt;
              &lt;version&gt;${webjars-bootstrap.version}&lt;/version&gt;
            &lt;/dependency&gt;
          &lt;/dependencies&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
    &lt;reporting&gt;
      &lt;plugins&gt;
        &lt;!-- integrate maven-cobertura-plugin to project site --&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
          &lt;artifactId&gt;cobertura-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;${cobertura.version}&lt;/version&gt;
          &lt;configuration&gt;
            &lt;formats&gt;
              &lt;format&gt;html&lt;/format&gt;
            &lt;/formats&gt;
            &lt;check /&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/reporting&gt;
  
    &lt;!-- Apache 2 license --&gt;
    &lt;licenses&gt;
      &lt;license&gt;
        &lt;name&gt;Apache License, Version 2.0&lt;/name&gt;
        &lt;url&gt;http://www.apache.org/licenses/LICENSE-2.0&lt;/url&gt;
      &lt;/license&gt;
    &lt;/licenses&gt;
  
    &lt;repositories&gt;
      &lt;repository&gt;
        &lt;id&gt;spring-snapshots&lt;/id&gt;
        &lt;name&gt;Spring Snapshots&lt;/name&gt;
        &lt;url&gt;https://repo.spring.io/snapshot&lt;/url&gt;
        &lt;snapshots&gt;
          &lt;enabled&gt;true&lt;/enabled&gt;
        &lt;/snapshots&gt;
      &lt;/repository&gt;
      &lt;repository&gt;
        &lt;id&gt;spring-milestones&lt;/id&gt;
        &lt;name&gt;Spring Milestones&lt;/name&gt;
        &lt;url&gt;https://repo.spring.io/milestone&lt;/url&gt;
        &lt;snapshots&gt;
          &lt;enabled&gt;false&lt;/enabled&gt;
        &lt;/snapshots&gt;
      &lt;/repository&gt;
    &lt;/repositories&gt;
  
  
    &lt;pluginRepositories&gt;
      &lt;pluginRepository&gt;
        &lt;id&gt;spring-snapshots&lt;/id&gt;
        &lt;name&gt;Spring Snapshots&lt;/name&gt;
        &lt;url&gt;https://repo.spring.io/snapshot&lt;/url&gt;
        &lt;snapshots&gt;
          &lt;enabled&gt;true&lt;/enabled&gt;
        &lt;/snapshots&gt;
      &lt;/pluginRepository&gt;
      &lt;pluginRepository&gt;
        &lt;id&gt;spring-milestones&lt;/id&gt;
        &lt;name&gt;Spring Milestones&lt;/name&gt;
        &lt;url&gt;https://repo.spring.io/milestone&lt;/url&gt;
        &lt;snapshots&gt;
          &lt;enabled&gt;false&lt;/enabled&gt;
        &lt;/snapshots&gt;
      &lt;/pluginRepository&gt;
    &lt;/pluginRepositories&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p><strong>ProductionConfigurationTests:</strong></p>
  
  <pre><code>import org.junit.runner.RunWith;
  
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.boot.test.context.SpringBootTest;
  import org.springframework.samples.petclinic.vet.VetRepository;
  import org.springframework.test.context.junit4.SpringRunner;
  import org.springframework.context.annotation.ComponentScan;
  import org.springframework.boot.autoconfigure.domain.EntityScan;
  import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
  
  @RunWith(SpringRunner.class)
  @SpringBootTest
  @ComponentScan({"org.springframework*"})
  @EntityScan("com.springframework*")
  @EnableJpaRepositories("com.springframework*")
  public class ProductionConfigurationTests {
  
      @Autowired
      private VetRepository vets;
  
      @Test
      public void testFindAll() throws Exception {
          vets.findAll();
          vets.findAll(); // served from cache
      }
  }
  </code></pre>
  
  <p>I tried downloading and added the spring-session-data.jar but it is still giving the same error. Kindly guide as I am new to this Maven/Spring</p>
  
  <p>Thanks</p>