You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 28, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on May 28, 2018. It is now read-only.
Jersey missing explicit dependency on javax.annotation #3767
java.lang.NoClassDefFoundError: javax/annotation/Priority
at org.glassfish.jersey.model.internal.RankedProvider.computeRank(RankedProvider.java:111)
at org.glassfish.jersey.model.internal.RankedProvider.<init>(RankedProvider.java:72)
at org.glassfish.jersey.internal.inject.Injections.lookupService(Injections.java:113)
at org.glassfish.jersey.internal.inject.Injections.lookupInjectionManagerFactory(Injections.java:97)
at org.glassfish.jersey.internal.inject.Injections.createInjectionManager(Injections.java:68)
at org.glassfish.jersey.client.ClientConfig$State.initRuntime(ClientConfig.java:432)
at org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:341)
at org.glassfish.jersey.client.ClientConfig.getRuntime(ClientConfig.java:826)
at org.glassfish.jersey.client.ClientRequest.getConfiguration(ClientRequest.java:285)
at org.glassfish.jersey.client.JerseyInvocation.validateHttpMethodAndEntity(JerseyInvocation.java:143)
at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:112)
at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:108)
at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:99)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:445)
at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:351)
@chkal I tried but never did manage to get this working. If Jersey 2.26 is usable on JDK 9 and 10, the steps should be documented somewhere. I suspect some actual code changes will be required, aside from documentation.
Activity
cowwoc commentedon Feb 1, 2018
See https://github.com/jersey/jersey/issues/3712 for a related discussion.
chkal commentedon Mar 31, 2018
I think that adding this dependency will lead to many problems for JDK8 users. Why don't you just add this dependency to your pom?
cowwoc commentedon Mar 31, 2018
@chkal I tried but never did manage to get this working. If Jersey 2.26 is usable on JDK 9 and 10, the steps should be documented somewhere. I suspect some actual code changes will be required, aside from documentation.
chkal commentedon Apr 1, 2018
AFAIK the Java EE related packages aren't visible to your application by default. Perhaps you could have a look here to see if this helps:
https://blog.codefx.org/java/java-9-migration-guide/#Dependencies-On-Java-EE-Modules