Reputation: 4171
When I try to use GrizzlyHttpServerFactory.createHttpServer
I get a "WARNING: Unknown HK2 failure detected:
" followed by two errors inside a "MultiException":
java.lang.NoSuchFieldError: WADL
"Unable to perform operation: create on org.glassfish.jersey.server.wadl.processor.WadlModelProcessor
"I am not knowledgeable in Jersey, but I have:
http://127.0.0.1:8086/the_uri/
). Didn't work.public class MyResourceConfig extends ResourceConfig {
public MyResourceConfig(){
register(CORSResponseFilter.class);
register(MyAPIPoint.class);
}
}
Contains two classes being registered and nothing else.
WARNING: The following warnings have been detected: WARNING: Unknown HK2 failure detected:
MultiException stack 1 of 2
java.lang.NoSuchFieldError: WADL
at org.glassfish.jersey.server.wadl.processor.WadlModelProcessor.<init>(WadlModelProcessor.java:96)
...
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.<init>(GrizzlyHttpContainer.java:331)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory.createHttpServer(GrizzlyHttpServerFactory.java:116)
MultiException stack 2 of 2
java.lang.IllegalStateException: Unable to perform operation: create on org.glassfish.jersey.server.wadl.processor.WadlModelProcessor
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:395)
...
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.<init>(GrizzlyHttpContainer.java:331)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory.createHttpServer(GrizzlyHttpServerFactory.java:116)
Upvotes: 3
Views: 4104
Reputation: 4171
(It's OK to Ask and Answer Your Own Questions)
After reading this question and this issue thread it seems that I might have a conflict in my dependencies.
Relevant dependencies: I'm using jersey 2.11 and tyrus-container-grizzly-server 1.13.
Edit: Updated the jersey version to 2.25 in the pom and the error disappeared.
If someone wants to try and give a better solution or explanation I can give more information about the setup of the project. I won't accept this answer as it is not complete.
Upvotes: 2