java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(); from WeldMessageConveyor
Asked Answered
H

1

10

I get the following exception when I try deploying my webApp on weblogic12:

weblogic.application.ModuleException: java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class org.jboss.weld.logging.WeldMessageConveyor
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:213)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:208)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class org.jboss.weld.logging.WeldMessageConveyor
at org.jboss.weld.logging.WeldMessageConveyor.<init>(WeldMessageConveyor.java:61)
at org.jboss.weld.logging.WeldMessageConveyerFactory.getDefaultMessageConveyer(WeldMessageConveyerFactory.java:27)
at org.jboss.weld.logging.LoggerFactory.<init>(LoggerFactory.java:37)
at org.jboss.weld.logging.LoggerFactory.loggerFactory(LoggerFactory.java:51)
at org.jboss.weld.bootstrap.WeldBootstrap.<clinit>(WeldBootstrap.java:126)
Truncated. see log file for complete stacktrace

Any one has an idea why? My application uses Errai

Holzer answered 30/5, 2014 at 14:49 Comment(1)
Based on this other issue you seem to be having a classloader issue with the version of guava that you useScharff
H
16

Based on @JoseM comment, this link helped. A quick fix I applied for now was to downgrade my guava lib from 16.0.1 to 14.0.1.

Holzer answered 2/6, 2014 at 6:26 Comment(4)
Reason of this error is that weblogic have dependency to older version of guava and you have never version in your dependencies. In newer version of guava makeComputingMap was removed. Downgrading Guava isn't best option. You should rather upgrade your weblogic server so it will have latest guava release.Methodist
Thanks so much had same problem with selenium here 'java.lang.IllegalAccessError: tried to access method com.google.common.util.concurrent.SimpleTimeLimiter' , downgrading from 3.6.0 to 3.4.0 solved the problem. Hopefully it helps someoneEthical
Hello this Aditya Neurgaonkar. I am using guava-18.0.jar. I am not having this issue on windows. But on Unix environment. Can you confirm is it OS specific?Pyxidium
@AdityaNeurgaonkar, Java is not OS specific. Just check the libs that are being loaded by your application.Awl

© 2022 - 2024 — McMap. All rights reserved.