java.lang.NoSuchMethodError: com.google.common.base.Verify.verify
See original GitHub issueDagger 2.14.1 Perhaps more classes require shading?
...
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.ltgt.gradle.errorprone.ErrorProneCompiler.execute(ErrorProneCompiler.java:66)
... 57 more
Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodError: com.google.common.base.Verify.verify(ZLjava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
at com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:158)
at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:96)
at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:90)
at com.google.errorprone.BaseErrorProneCompiler.run(BaseErrorProneCompiler.java:137)
at com.google.errorprone.BaseErrorProneCompiler.run(BaseErrorProneCompiler.java:108)
at com.google.errorprone.ErrorProneCompiler.run(ErrorProneCompiler.java:118)
at com.google.errorprone.ErrorProneCompiler.compile(ErrorProneCompiler.java:65)
... 62 more
Caused by: java.lang.NoSuchMethodError: com.google.common.base.Verify.verify(ZLjava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
at dagger.internal.codegen.BindingGraph$Factory.create(BindingGraph.java:349)
at dagger.internal.codegen.BindingGraph$Factory.create(BindingGraph.java:342)
at dagger.internal.codegen.BindingGraph$Factory.create(BindingGraph.java:342)
at dagger.internal.codegen.BindingGraph$Factory.create(BindingGraph.java:244)
at dagger.internal.codegen.ComponentProcessingStep.process(ComponentProcessingStep.java:138)
at dagger.internal.codegen.ComponentProcessingStep.process(ComponentProcessingStep.java:47)
at dagger.shaded.auto.common.BasicAnnotationProcessor.process(BasicAnnotationProcessor.java:330)
at dagger.shaded.auto.common.BasicAnnotationProcessor.process(BasicAnnotationProcessor.java:181)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:968)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:884)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$2200(JavacProcessingEnvironment.java:108)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1204)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1313)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1267)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:943)
at com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:100)
at com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:142)
... 68 more
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:6
Top Results From Across the Web
java.lang.NoSuchMethodError: com.google.common.base ...
By updating the version of guice, the problem solved for me. You can check if there is another library using guava by "mvn...
Read more >java.lang.NoSuchMethodError: com.google.common.base ...
Hi Team, I am Not able to run hive. Getting following error on hive version above 3.X, i tried all the versions. It...
Read more >Verify (Guava: Google Core Libraries for Java 23.0 API)
Ensures that reference is non-null, throwing a VerifyException with a custom message otherwise. Methods inherited from class java.lang.Object · clone, equals, ...
Read more >Spark writing to S3 failed: java.lang.NoSuchMethodError
Caused by: java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object ...
Read more >java.lang.NoSuchMethodError: com.google ... - Google Groups
What do you use to serve your web application ? Tomcat ? Perhaps you might want to check if there are any libraries...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Looked into this some more. Bumping the version of Dagger 2 from 2.13 to 2.14.1 breaks when used in conjunction with the gradle-errorprone-plugin (v0.0.10). I had trouble reproducing locally at first, because I was omitting a flag that we set on CI which “applies” the gradle-errorprone-plugin.
Confirming @ronshapiro’s comment above, forcing Guava to 23.6-jre with the following snippet works:
When I diff my app dependencies with and without applying the errorprone-gradle-plugin on Dagger 2.13, then diff again (w/wo plugin) after bumping to Dagger 2.14.1, then diff those results, I get:
However, Guava 19.0, 21.0 and 23.6-jre all have the same method declaration in Verify.java, i.e.,
One thing worth noting (since forcing Guava 23.6-jre works): the nullable annotations applied to this method signature changed from 23.5 to 23.6 in this commit: https://github.com/google/guava/commit/6f22af40e1526b8c194e9e36d457bcd37680c6a3
Could that be related?
Somewhere there’s an old version of Guava that’s being pushed on the annotation processor path. If I manually add this to the pom, the build succeeds: