#java #guava #guice #atmosphere
#java #гуава #угадайка #атмосфера
Вопрос:
Атмосфера выдает эту ошибку:
NoSuchMethodError: com.google.common.collect.MapMaker.makeComputingMap
Использование версии 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>
И использование версии Guava 29.0-jre
и Guice 4.2.3
в пути к классу
Вот полная трассировка стека:
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)
Какая версия Guava / Guice исправит это?
Комментарии:
1. глядя
FailableCache
на графический интерфейс 4.2.3, он не вызываетсяmakeComputingMap
. Итак, вы уверены, что у вас есть эта версия guice?