Environment details
- OS: OSX 10.12.6
- Java version: 1.8.0_111-b14, 64 bit
- google-http-java-client version: 1.25.0/1.26.0
Steps to reproduce
- The Statement
Preconditions.checkState(true); works fine in 1.25.0.
- Then switch to Version 1.26.0.
- Now you will get a
NoClassDefFoundError
- Then add guava (version 20.0) and everything is good again.
Stacktrace
java.lang.NoClassDefFoundError: com/google/common/base/Preconditions
at com.google.api.client.util.Preconditions.checkState(Preconditions.java:81)
at org.soundtouch4j.ZoneApiTest.testPrecondition(ZoneApiTest.java:172)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at java.util.ArrayList.forEach(ArrayList.java:1249)
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Preconditions
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 41 more
Any additional information below
Making sure to follow these steps will guarantee the quickest resolution possible.
In the class Preconditions there is a change from com.google.api.client.repackaged.com.google.common.base.Preconditions.checkArgument(expression); to com.google.common.base.Preconditions.checkArgument(expression); . And this package is not part of the JAR File.
Environment details
Steps to reproduce
Preconditions.checkState(true);works fine in 1.25.0.NoClassDefFoundErrorStacktrace
Any additional information below
Making sure to follow these steps will guarantee the quickest resolution possible.
In the class
Preconditionsthere is a change fromcom.google.api.client.repackaged.com.google.common.base.Preconditions.checkArgument(expression);tocom.google.common.base.Preconditions.checkArgument(expression);. And this package is not part of the JAR File.