Search code examples
javamavenjersey

What dependency needs to be added to avoid java.lang.NoClassDefFoundError: org/glassfish/jersey/internal/guava/Sets?


Any idea what maven dependency(also the version) to add in pom.xml for this error? I'm using an external jar so not sure what to add exactly for this.


Solution

  • This is the jersey-common library. You can try referencing the latest version up to date:

    <dependency>
        <groupId>org.glassfish.jersey.core</groupId>
        <artifactId>jersey-common</artifactId>
        <version>3.0.3</version>
    </dependency>
    
    

    If it fails, you can try decreasing version number from this list.