title: NoClassDefFoundError com.google.common.collect.Lists
body: <p>I am using Jersey (or attempting to) in order to develop a RESTful API + some JSP pages on App Engine. The error I am getting clearly seems to indicate a problem with guava. </p>
  
  <blockquote>
    <p>[INFO] GCLOUD: WARNING: Error starting handlers [INFO] GCLOUD:
    java.lang.NoClassDefFoundError: com/google/common/collect/Lists</p>
  </blockquote>
  
  <p>My understanding was that for the version of Jersey I should use a specifically repackaged version of guava to match. Is this incorrect? What version of Guava do I need to add as a dependency to finally be gone with this error message?</p>
  
  <p>This is my dependency tree according to maven. Guava can be found on the second line.</p>
  
  <pre><code>[INFO] +- com.google.appengine:appengine-api-1.0-sdk:jar:1.9.48:compile
  [INFO] +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.25:compile
  [INFO] +- javax.servlet:servlet-api:jar:2.5:provided
  [INFO] +- jstl:jstl:jar:1.2:compile
  [INFO] +- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.25:compile
  [INFO] |  +- org.glassfish.hk2.external:javax.inject:jar:2.5.0-b30:compile
  [INFO] |  +- org.glassfish.jersey.core:jersey-common:jar:2.25:compile
  [INFO] |  |  +- javax.annotation:javax.annotation-api:jar:1.2:compile
  [INFO] |  |  +- org.glassfish.hk2:hk2-api:jar:2.5.0-b30:compile
  [INFO] |  |  |  +- org.glassfish.hk2:hk2-utils:jar:2.5.0-b30:compile
  [INFO] |  |  |  \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.5.0-b30:compile
  [INFO] |  |  +- org.glassfish.hk2:hk2-locator:jar:2.5.0-b30:compile
  [INFO] |  |  |  \- org.javassist:javassist:jar:3.20.0-GA:compile
  [INFO] |  |  \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
  [INFO] |  +- org.glassfish.jersey.core:jersey-server:jar:2.25:compile
  [INFO] |  |  +- org.glassfish.jersey.core:jersey-client:jar:2.25:compile
  [INFO] |  |  +- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.25:compile
  [INFO] |  |  \- javax.validation:validation-api:jar:1.1.0.Final:compile
  [INFO] |  \- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
  [INFO] +- org.glassfish.jersey.ext:jersey-mvc-jsp:jar:2.4:compile
  [INFO] |  \- org.glassfish.jersey.ext:jersey-mvc:jar:2.4:compile
  [INFO] \- javax.ejb:javax.ejb-api:jar:3.2:compile
  [INFO]    \- javax.transaction:javax.transaction-api:jar:1.2:compile
  </code></pre>
  
  <p>This is the lib folder of my compilation target, Guava is in there and I don't see a conflict for it.</p>
  
  <pre><code>aopalliance-repackaged-2.5.0-b30.jar
  appengine-api-1.0-sdk-1.9.48.jar
  hk2-api-2.5.0-b30.jar
  hk2-locator-2.5.0-b30.jar
  hk2-utils-2.5.0-b30.jar
  javassist-3.20.0-GA.jar
  javax.annotation-api-1.2.jar
  javax.ejb-api-3.2.jar
  javax.inject-2.5.0-b30.jar
  javax.transaction-api-1.2.jar
  javax.ws.rs-api-2.0.1.jar
  jersey-client-2.25.jar
  jersey-common-2.25.jar
  jersey-container-servlet-core-2.25.jar
  jersey-guava-2.25.jar
  jersey-media-jaxb-2.25.jar
  jersey-mvc-2.4.jar
  jersey-mvc-jsp-2.4.jar
  jersey-server-2.25.jar
  jstl-1.2.jar
  osgi-resource-locator-1.0.1.jar
  validation-api-1.1.0.Final.jar
  </code></pre>
  
  <p>Previously I had a similar error, for presumably similar reasons but that seemed to go away after changing to the current Guava version (to repackaged 2.25 from 22.0 official) and running maven clean install..</p>
  
  <blockquote>
    <p>[INFO] GCLOUD: WARNING: failed
    JettyContainerService$ApiProxyHandler@44578632:
    java.lang.NoSuchMethodError:
    org.glassfish.jersey.server.model.internal.ModelProcessorUtil.enhanceResource(Lorg/glassfish/jersey/server/model/RuntimeResource;Lorg/glassfish/jersey/server/model/ResourceModel$Builder;Ljava/util/List;)V</p>
  </blockquote>
  
  <p>Any help would be much appreciated, I'm painfully close to giving up on Jersey entirely after previous struggles.</p>
  
  <p>Help me Obi Wan Kenobi. You're my only hope.</p>