gpt4 book ai didi

java - maven java.lang.IllegalAccessError : tried to access method com. google.common.collect.MapMaker.makeComputingMap

转载 作者:行者123 更新时间:2023-11-30 08:47:15 25 4
gpt4 key购买 nike

您好,我在使用 m2eclipse 运行 maven 的 eclipse 中遇到这个错误,任何 Maven 功能(安装、清理等)都会发生同样的错误。

Exception in thread "main" 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)
at com.google.inject.internal.Annotations.<clinit>(Annotations.java:122)
at com.google.inject.Key.ensureRetainedAtRuntime(Key.java:362)
at com.google.inject.Key.strategyFor(Key.java:354)
at com.google.inject.Key.get(Key.java:222)
at org.eclipse.sisu.wire.ParameterKeys.<clinit>(ParameterKeys.java:28)
at org.eclipse.sisu.wire.DependencyAnalyzer.<init>(DependencyAnalyzer.java:92)
at org.eclipse.sisu.wire.ElementAnalyzer.<init>(ElementAnalyzer.java:87)
at org.eclipse.sisu.wire.WireModule.configure(WireModule.java:74)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:230)
at com.google.inject.spi.Elements.getElements(Elements.java:103)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:136)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
at com.google.inject.Guice.createInjector(Guice.java:96)
at com.google.inject.Guice.createInjector(Guice.java:73)
at com.google.inject.Guice.createInjector(Guice.java:62)
at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:477)
at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:203)
at org.apache.maven.cli.MavenCli.container(MavenCli.java:400)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:207)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

控制台指向 slf4j 作为最后一个组成部分

constituent[39]: file:/C:/eclipse/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.5.1.20150109-1819/jars/slf4j-simple-1.7.5.jar

我的项目maven依赖guava-17.0和junit-4.10

最佳答案

这是由 bug 引起的已于 2014 年 10 月修复。升级 Guice(及其 Guava)将解决该问题。

关于java - maven java.lang.IllegalAccessError : tried to access method com. google.common.collect.MapMaker.makeComputingMap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32528042/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com