Jenkins Spock Tests failing with java.lang.NoSuchMethodError: com.google.common.collect.Sets

252 Views Asked by At

JenkinsPipelineSpecification based tests fail with the error: java.lang.NoSuchMethodError: com.google.common.collect.Sets$SetView.iterator()Lcom/google/common/collect/UnmodifiableIterator;

1

There are 1 best solutions below

0
On

I had a similar problem where the tests ran in Maven, but failed with the above error in IntelliJ IDEA. I fixed it by setting the project SDK and language level to 1.8 under File -> Project Structure -> Project -> Project SDK / Project language level. Maybe that helps someone out there.