New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If the dependencies are managed up to Guava 18, there is a problem with Guice using a deprecated and no longer public method. #846
Comments
It looks like this is fixed by 8743a0b Any chance you could push a .1 release with this change? |
Are you getting this exception with the 3.0 release of the 4.0 beta release? With 3.0 there should be no issue because we embed Guava internally. With 4.0.. I'll figure out how to cut a new beta. |
Guava 18 compatible new beta release would be greatly appreciated. Gerrit Code Review project still depends on custom Guice build, because this fix wasn't released yet [1]. [1] 3b02622 |
4.0 beta5 pushed with the changes. |
We are building our own Guice artifact with Guava bundled and relocated the way it was in Guice 3 to avoid issues like this. I'd suggest doing this unless you happen to use Guava 16.0.1 (the version Guice is compiled against). Even if you do use Guava 16.0.1, I'd still recommend doing it in case you upgrade Guava in the future. |
I'm still getting this error in when running 4.0-beta5 |
Are you sure you don't have an earlier guice in your classpath somewhere? |
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.(Annotations.java:104)
at com.google.inject.internal.Annotations.(Annotations.java:122)
at com.google.inject.spi.InjectionPoint.(InjectionPoint.java:94)
at com.google.inject.spi.InjectionPoint$InjectableField.toInjectionPoint(InjectionPoint.java:440)
at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:725)
at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:358)
at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:377)
at com.google.inject.internal.BindingBuilder.toInstance(BindingBuilder.java:84)
I see that in the released version of the 4.0 beta: https://github.com/google/guice/blob/359c5c3ec4083dea3dd5060ffc4087d73ff98777/core/src/com/google/inject/internal/Annotations.java
On line 73 and 221 makeComputingMap is used. It's been changed to package scope in guava 18 it would appear.
The text was updated successfully, but these errors were encountered: