I tried to intiliase Eyes in my automation project, but I am getting this error:
Message: java.lang.NoSuchFieldError: EXCLUDE_EMPTY
Stack Trace:
org.glassfish.jersey.client.ClientConfig$State.<init>(ClientConfig.java:147)
org.glassfish.jersey.client.ClientConfig.<init>(ClientConfig.java:457)
com.applitools.connectivity.api.HttpClientImpl.<init>(HttpClientImpl.java:26)
com.applitools.connectivity.RestClient.<init>(RestClient.java:60)
com.applitools.connectivity.ServerConnector.<init>(ServerConnector.java:42)
com.applitools.connectivity.ServerConnector.<init>(ServerConnector.java:46)
com.applitools.connectivity.ServerConnector.<init>(ServerConnector.java:50)
com.applitools.connectivity.ServerConnector.<init>(ServerConnector.java:54)
com.applitools.eyes.EyesBase.<init>(EyesBase.java:106)
com.applitools.eyes.selenium.Eyes.<init>(Eyes.java:134)
On Eyes eyes = new Eyes();
And my dependencies are:
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<version>2.31</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>2.31</version>
</dependency>
<dependency>
<groupId>com.applitools</groupId>
<artifactId>eyes-selenium-java4</artifactId>
<version>4.14.0</version>
</dependency>
I have tried to switch the jersey versions, restart Intellij, but to no avail. For context, I am using Gauge for automation and Intellij IDEA.
This is Sophie from Applitools. Eyes package already brings Jersey dependencies with it, so you can remove the explicit Jersey dependencies. Also, I would recommend using eyes-selenium-java3 instead of 4.