NoSuchMethodError: com.google.common.collect.MapMaker.makeComputingMap

962 views Asked by At

Atmosphere is throwing this error:

NoSuchMethodError: com.google.common.collect.MapMaker.makeComputingMap

Using version 2.6.4

        <dependency>
            <groupId>org.atmosphere</groupId>
            <artifactId>atmosphere-runtime</artifactId>
            <version>${atmosphere-version}</version>
        </dependency>
        <dependency>
            <groupId>org.atmosphere</groupId>
            <artifactId>atmosphere-annotations</artifactId>
            <version>${atmosphere-version}</version>
        </dependency>
        <dependency>
            <groupId>org.atmosphere</groupId>
            <artifactId>atmosphere-guice</artifactId>
            <version>${atmosphere-version}</version>
        </dependency>
        <dependency>
            <groupId>org.atmosphere</groupId>
            <artifactId>atmosphere-jersey</artifactId>
            <version>${atmosphere-version}</version>
        </dependency>

And using Guava version 29.0-jre and Guice 4.2.3 in the classpath

Here's the complete stack trace:

Caused by: java.lang.NoSuchMethodError: com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap;
    at com.google.inject.internal.FailableCache.<init> (FailableCache.java:32)
    at com.google.inject.internal.ConstructorInjectorStore$1.<init> (ConstructorInjectorStore.java:33)
    at com.google.inject.internal.ConstructorInjectorStore.<init> (ConstructorInjectorStore.java:32)
    at com.google.inject.internal.InjectorImpl.<init> (InjectorImpl.java:922)
    at com.google.inject.internal.InjectorShell$Builder.build (InjectorShell.java:143)
    at com.google.inject.internal.InternalInjectorCreator.build (InternalInjectorCreator.java:104)
    at com.google.inject.Guice.createInjector (Guice.java:94)
    at com.google.inject.Guice.createInjector (Guice.java:71)
    at com.google.inject.Guice.createInjector (Guice.java:61)
    at org.atmosphere.guice.GuiceObjectFactory.initInjector (GuiceObjectFactory.java:97)
    at org.atmosphere.guice.GuiceObjectFactory.newClassInstance (GuiceObjectFactory.java:68)
    at org.atmosphere.guice.GuiceObjectFactory.configure (GuiceObjectFactory.java:59)
    at org.atmosphere.cpr.AtmosphereFramework.lookupDefaultObjectFactoryType (AtmosphereFramework.java:1695)
    at org.atmosphere.cpr.AtmosphereFramework.init (AtmosphereFramework.java:875)
    at org.atmosphere.cpr.AtmosphereFramework.init (AtmosphereFramework.java:833)
    at org.atmosphere.cpr.AtmosphereFrameworkInitializer.configureFramework (AtmosphereFrameworkInitializer.java:76)
    at org.atmosphere.cpr.AtmosphereServlet.configureFramework (AtmosphereServlet.java:83)
    at org.atmosphere.cpr.AtmosphereServlet.configureFramework (AtmosphereServlet.java:79)
    at org.atmosphere.cpr.AtmosphereServlet.init (AtmosphereServlet.java:74)
    at org.eclipse.jetty.servlet.ServletHolder.initServlet (ServletHolder.java:670)

Which Guava/Guice version would fix this?

0

There are 0 answers