title: java.lang.ClassNotFoundException: org.spark_project.guava.collect.MapMaker
body: <p>I am trying to integrate apache spark with spring-boot cassandra project. But while running the project it gives following error:</p>
  
  <pre><code>    Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: org/spark_project/guava/collect/MapMaker] with root cause
      java.lang.ClassNotFoundException: org.spark_project.guava.collect.MapMaker
  </code></pre>
  
  <p>I checked my maven dependencies and the mapmaker file was present there in the spark-network-common_2.11.jar within 'org/spark_project/guava/collect/'. 
  Here is the pom file dependencies I am using:</p>
  
  <pre><code>&lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter&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;dependency&gt;
          &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
          &lt;artifactId&gt;spring-data-cassandra&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;!-- https://mvnrepository.com/artifact/com.datastax.cassandra/cassandra-driver-core --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.datastax.cassandra&lt;/groupId&gt;
          &lt;artifactId&gt;cassandra-driver-core&lt;/artifactId&gt;
          &lt;version&gt;3.5.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/org.apache.spark/spark-network-common --&gt;
      &lt;!-- &lt;dependency&gt;
         &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
         &lt;artifactId&gt;spark-network-common_2.10&lt;/artifactId&gt;
         &lt;version&gt;1.3.0&lt;/version&gt;
      &lt;/dependency&gt; --&gt;
      &lt;!-- &lt;dependency&gt;
          &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
          &lt;artifactId&gt;spark-network-common_2.11&lt;/artifactId&gt;
          &lt;version&gt;2.2.1&lt;/version&gt;
      &lt;/dependency&gt; --&gt;
  
  
      &lt;!-- https://mvnrepository.com/artifact/com.datastax.cassandra/cassandra-driver-mapping --&gt;
      &lt;!-- &lt;dependency&gt; &lt;groupId&gt;com.datastax.cassandra&lt;/groupId&gt; &lt;artifactId&gt;cassandra-driver-mapping&lt;/artifactId&gt; 
          &lt;version&gt;3.5.0&lt;/version&gt; &lt;/dependency&gt; --&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;!-- https://mvnrepository.com/artifact/org.apache.spark/spark-core --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
          &lt;artifactId&gt;spark-core_2.11&lt;/artifactId&gt;
          &lt;version&gt;2.2.1&lt;/version&gt;
      &lt;/dependency&gt;
  
  
  
  
      &lt;!-- https://mvnrepository.com/artifact/com.datastax.spark/spark-cassandra-connector --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.datastax.spark&lt;/groupId&gt;
          &lt;artifactId&gt;spark-cassandra-connector_2.11&lt;/artifactId&gt;
          &lt;version&gt;2.0.8&lt;/version&gt;
      &lt;/dependency&gt;
  
  
      &lt;!-- https://mvnrepository.com/artifact/org.apache.spark/spark-sql --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
          &lt;artifactId&gt;spark-sql_2.11&lt;/artifactId&gt;
          &lt;version&gt;2.2.1&lt;/version&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>The spark-network-common_2.11.jar comes along with the spark-core dependency, still I tried to add it separately, but even that didn't work. 
  What could be the problem that spring-boot can't identify the mapmaker file at runtime?
  Any help is appreciated.</p>