Skip to Content
0
Jul 03, 2018 at 08:53 PM

Getting NoClassFound for javax/annotation/Priority

51 Views

All I am trying to do is to call a restful service.

 WebTarget webTarget = client.target(cfg.getString("restservices.search.endpoint", "")).path(location.getNumber());        
  Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);            
 List<SearchData> cards = invocationBuilder.get(new GenericType<List<SearchData>>(){});

I get the error on the last line when I try to get the List of SearchData

Here is the stack trace:

java.lang.NoClassDefFoundError: javax/annotation/Priority at org.glassfish.jersey.model.internal.CommonConfig$2.compare(CommonConfig.java:597) at org.glassfish.jersey.model.internal.CommonConfig$2.compare(CommonConfig.java:594) at java.util.TreeMap.compare(java.base@9-internal/TreeMap.java:1292) at java.util.TreeMap.put(java.base@9-internal/TreeMap.java:536) at java.util.TreeSet.add(java.base@9-internal/TreeSet.java:255) at java.util.AbstractCollection.addAll(java.base@9-internal/AbstractCollection.java:352) at java.util.TreeSet.addAll(java.base@9-internal/TreeSet.java:312)

Please note: I have a standalone application and there I dont see this error, with same set of jars that we have in hybris extensions.