Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Exception deploying Servlet and Metro WS


I have an embedded Jetty 9.2.1 server in my application where I have deployed a servlet in a ServletContextHandler. At the same time I want to deploy a Metro WS in the same server using JettyHttpServerProvider, but when I try to publish the
WS Endpoint I get the following exception:

Caused by: Server Runtime Error: java.lang.UnsupportedOperationException: !DelegatingThreadPool at at at at

If I use two Jetty server instances embedded in my application and listening in different ports, all work properly, but I would like to share the same port among the servlet and the Metro WS.

My faulty code follows:

Server server = new Server(8080);


ContextHandlerCollection contexts = new ContextHandlerCollection();

servletContext =  new ServletContextHandler(server, "/myapp", true, false);

ServletHolder servletHolder = new ServletHolder(MyServlet);
servletContext.addServlet(servletHolder, "/servlet-path");

HandlerCollection handlerCollection = new HandlerCollection();
handlerCollection.setHandlers(new Handler[]{ contexts });

Endpoint endpoint = Endpoint.publish(endpointURL, myWebServices);



Any idea ?

Alejandro Alberola
Bio Data Systems

Back to the top