How to solve " java.lang.NoSuchMethodError "




Suddenly my maven tests start to fail leaving me frustrated. After figuring out I go through the forum which simply suggested n update to a jar called 'guava'

Error that I was getting:
java.lang.NoSuchMethodError: com.google.common.collect.ImmutableSet.toImmutableSet()Ljava/util/stream/Collector;

Solution :
Update your pom.xml to include

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>23.0</version>
        </dependency>

Comments

  1. Thanks a ton buddy.
    you rock.
    this works.

    ReplyDelete
  2. Replies
    1. Thank you for this ! the errors I was seeing was not getting me any solution whatsoever, until I used your solution ..

      Delete
  3. After searching the internet for 4 days this ended my struggle and pain, thank you very much for this

    ReplyDelete
  4. Thanks alot buddy !! This was magical

    ReplyDelete

Post a Comment

Popular Posts