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

Getting NoClassFound for javax/annotation/Priority


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

 WebTarget webTarget ="", "")).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$ at org.glassfish.jersey.model.internal.CommonConfig$ at at java.util.TreeMap.put(java.base@9-internal/ at java.util.TreeSet.add(java.base@9-internal/ at java.util.AbstractCollection.addAll(java.base@9-internal/ at java.util.TreeSet.addAll(java.base@9-internal/

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.