IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class com.google.inject.internal.Annotations$AnnotationChecker

Solution Unverified - Updated -

Issue

Out war application is failing to start with this exception:

ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/example]] (ServerService Thread Pool -- 43) JBWEB000287: Exception sending context initialized event to listener instance of class examples.servlet.GuiceConfig: java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class com.google.inject.internal.Annotations$AnnotationChecker
  at com.google.inject.internal.Annotations$AnnotationChecker.<init>(Annotations.java:104) [sisu-guice-3.1.0-no_aop.jar:]
  at com.google.inject.internal.Annotations.<clinit>(Annotations.java:122) [sisu-guice-3.1.0-no_aop.jar:]
  at com.google.inject.internal.ProviderMethodsModule.getKey(ProviderMethodsModule.java:131) [sisu-guice-3.1.0-no_aop.jar:]
  at com.google.inject.internal.ProviderMethodsModule.createProviderMethod(ProviderMethodsModule.java:118) [sisu-guice-3.1.0-no_aop.jar:]
  at com.google.inject.internal.ProviderMethodsModule.getProviderMethods(ProviderMethodsModule.java:85) [sisu-guice-3.1.0-no_aop.jar:]
  at com.google.inject.internal.ProviderMethodsModule.configure(ProviderMethodsModule.java:75) [sisu-guice-3.1.0-no_aop.jar:]
  at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:229) [sisu-guice-3.1.0-no_aop.jar:]
  at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:238) [sisu-guice-3.1.0-no_aop.jar:]
  at com.google.inject.AbstractModule.install(AbstractModule.java:121) [sisu-guice-3.1.0-no_aop.jar:]
  at com.google.inject.servlet.ServletModule.configure(ServletModule.java:50) [guice-servlet-3.0.jar:]
  at com.google.inject.AbstractModule.configure(AbstractModule.java:62) [sisu-guice-3.1.0-no_aop.jar:]
  at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:229) [sisu-guice-3.1.0-no_aop.jar:]
  at com.google.inject.spi.Elements.getElements(Elements.java:103) [sisu-guice-3.1.0-no_aop.jar:]
  at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:136) [sisu-guice-3.1.0-no_aop.jar:]
  at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104) [sisu-guice-3.1.0-no_aop.jar:]
  at com.google.inject.Guice.createInjector(Guice.java:94) [sisu-guice-3.1.0-no_aop.jar:]
  at com.google.inject.Guice.createInjector(Guice.java:82) [sisu-guice-3.1.0-no_aop.jar:]
  at examples.servlet.GuiceConfig.getInjector(GuiceConfig.java:35) [classes:]
...

Environment

Red Hat JBoss Enterprise Application Platform
Google Guice

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content