I was able to run my Spring MVC appication, until the point where I introduced swagger dependency for the API documentation.
Now when I run the application in jetty server[Run as -> Run Jetty], I get the below error
java.lang.NoSuchMethodError: com.google.common.collect.Multimaps.asMap(Lcom/google/common/collect/ListMultimap;)Ljava/util/Map;
at com.mangofactory.swagger.scanners.ApiListingReferenceScanner.getResourceGroupRequestMappings(ApiListingReferenceScanner.java:146)
Searching the web, I see comments on upgrading the com.google.guava
to 15.0 version, but still the issue persists.
Changes made that triggered the error: pom.xml:
<dependency>
<groupId>com.mangofactory</groupId>
<artifactId>swagger-springmvc</artifactId>
<version>0.8.8</version>
</dependency>
and the SwaggerConfig.java for Enabling swagger as mentioned here : http://java.dzone.com/articles/how-configure-swagger-generate
I'm stuck, please help
Update: Running in tomcat, but not in jetty
Update [11/11]:
- upgraded swagger version to 0.9.1
- upgraded guava version to 18.0
mvn dependency:tree
shows only one guava versioncom.google.guava:guava:jar:18.0:compile
Even now the same issue exists!