I'm developping an application that expose some data from database as Restful webservice(jersey plugin based) to be consumed by a mobile app. The problem is that my project is a JSF 2.2 framework based, and when I add the jersey dependencies jars to the build path and try to run the app as a web app with wildfly 10 I got many errors in the console and the application doesn't deployed in the server I really didn't understand why with jersey dependencies The JSF app is not able to run and to consume some ws resources.
I have tried to add the requested jars when the server is crashed and always seem to end up having errors in the console.
This is a console overview
01:44:54,763 ERROR [org.jboss.msc.service.fail] (ServerService Thread
Pool -- 70) MSC000001: Failed to start service
jboss.undertow.deployment.default-server.default-host./JSFWebService:
org.jboss.msc.service.StartException in service
jboss.undertow.deployment.default-server.default-host./JSFWebService:
java.lang.NoClassDefFoundError:
org/glassfish/hk2/utilities/binding/BindingBuilder at
org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748) at
org.jboss.threads.JBossThread.run(JBossThread.java:320) Caused by:
java.lang.NoClassDefFoundError:
org/glassfish/hk2/utilities/binding/BindingBuilder at
org.glassfish.jersey.server.ResourceConfig.<init>(ResourceConfig.java:356)
at
org.glassfish.jersey.server.ResourceConfig$WrappingResourceConfig.<init>(ResourceConfig.java:1050)
at
org.glassfish.jersey.server.ResourceConfig.forApplicationClass(ResourceConfig.java:348)
at
org.glassfish.jersey.servlet.init.JerseyServletContainerInitializer.addServletWithDefaultConfiguration(JerseyServletContainerInitializer.java:245)
at
org.glassfish.jersey.servlet.init.JerseyServletContainerInitializer.onStartupImpl(JerseyServletContainerInitializer.java:183)
at
org.glassfish.jersey.servlet.init.JerseyServletContainerInitializer.onStartup(JerseyServletContainerInitializer.java:144)
at
io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:186)
at
io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:171)
at
io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
at
io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at
io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at
io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at
io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at
io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at
io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at
io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:234)
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
... 6 more Caused by: java.lang.ClassNotFoundException:
org.glassfish.hk2.utilities.binding.BindingBuilder from [Module
"deployment.JSFWebService.war:main" from Service Module Loader] at
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
... 24 more
01:44:54,776 ERROR [org.jboss.as.controller.management-operation]
(Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed -
address: ([("deployment" ="JSFWebService.war")]) - failure
description: {
"WFLYCTL0080: Failed services" ={"jboss.undertow.deployment.default-server.default-host./JSFWebService"
="org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./JSFWebService:
java.lang.NoClassDefFoundError:
org/glassfish/hk2/utilities/binding/BindingBuilder
Caused by: java.lang.NoClassDefFoundError: org/glassfish/hk2/utilities/binding/BindingBuilder
Caused by: java.lang.ClassNotFoundException: org.glassfish.hk2.utilities.binding.BindingBuilder from [Module
\"deployment.JSFWebService.war:main\" from Service Module Loader]"},
"WFLYCTL0412: Required services that are not installed:" =["jboss.undertow.deployment.default-server.default-host./JSFWebService"],
"WFLYCTL0180: Services with missing/unavailable dependencies" =undefined } 01:44:54,854 INFO [org.jboss.as.server] (ServerService
Thread Pool -- 34) WFLYSRV0010: Deployed "JSFWebService.war"
(runtime-name : "JSFWebService.war") 01:44:54,916 INFO
[org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183:
Service status report WFLYCTL0186: Services which failed to start:
service
jboss.undertow.deployment.default-server.default-host./JSFWebService:
org.jboss.msc.service.StartException in service
jboss.undertow.deployment.default-server.default-host./JSFWebService:
java.lang.NoClassDefFoundError:
org/glassfish/hk2/utilities/binding/BindingBuilder
Thanks for support.