cancel
Showing results for 
Search instead for 
Did you mean: 

Getting NoClassFound for javax/annotation/Priority

0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

added webservicescommons extension to my custom extension, and it resolved this issue.

Answers (0)