Problem
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've Tried
I am not knowledgeable in Jersey, but I have:
- Read this similar, unsolved question from seven months ago, and this one from two years ago.
- Learned that the ResourceConfig is meant to replace/simplify a web.xml, but this project has no existing (and thus, no conflicting) web.xmls.
- Removed the underscores and changed the port number in the URI (
http://127.0.0.1:8086/the_uri/
). Didn't work.
In-depth
ResourceConfig I'm using:
public class MyResourceConfig extends ResourceConfig {
public MyResourceConfig(){
register(CORSResponseFilter.class);
register(MyAPIPoint.class);
}
}
Contains two classes being registered and nothing else.
Truncated Error Stack Trace:
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)