Don't include the jetty-cdi jars in your project. They are designed for WebAppContext's being deployed as wars by the DeploymentManager (with the war isolation in-tact) on jetty-distribution. Something that isn't appropriate for your typical embedded-jetty usage.
If you need CDI, use the weld jars directly, and put them in your war's WEB-INF/lib/ directory. Note: Don't forget to setup the WebAppClassloader values that the weld documentation recommend. Joakim Erdfelt / [email protected] On Wed, Jun 22, 2016 at 2:54 AM, Sterpu Victor <[email protected]> wrote: > Hello > > I use Jetty 9.3.9 and I'm trying to run this example > https://www.eclipse.org/jetty/documentation/9.3.x/embedded-examples.html#embedded-webapp-jsp > The error is: > 22 [main] INFO org.eclipse.jetty.util.log - Logging initialized @535ms > 417 [main] INFO org.eclipse.jetty.server.Server - jetty-9.3.9.v20160517 > 1757 [main] INFO org.eclipse.jetty.server.AbstractConnector - Started > ServerConnector@1690630{HTTP/1.1,[http/1.1]}{0.0.0.0:8080} > Exception in thread "main" java.util.ServiceConfigurationError: > javax.servlet.ServletContainerInitializer: Provider > org.eclipse.jetty.cdi.websocket.WebSocketCdiInitializer not found > at java.util.ServiceLoader.fail(ServiceLoader.java:239) > at java.util.ServiceLoader.access$300(ServiceLoader.java:185) > at > java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:372) > at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) > at java.util.ServiceLoader$1.next(ServiceLoader.java:480) > at > org.eclipse.jetty.annotations.AnnotationConfiguration.getNonExcludedInitializers(AnnotationConfiguration.java:864) > at > org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:444) > at > org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:494) > at > org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1361) > at > org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:772) > at > org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262) > at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:520) > at > org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) > at > org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) > at org.eclipse.jetty.server.Server.start(Server.java:411) > at > org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:106) > at > org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) > at org.eclipse.jetty.server.Server.doStart(Server.java:378) > at > org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) > at HttpTest.JettyTest3.test(JettyTest3.java:85) > at StartClass.main(StartClass.java:81) > Thank you > Victor S. > > _______________________________________________ > jetty-users mailing list > [email protected] > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/jetty-users >
_______________________________________________ jetty-users mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
