1 Reply Latest reply on Jan 16, 2018 7:59 AM by Guido Chiesa

    jersey-gf-cdi with wildfly 11

    Ashiish H Newbie

      Hi,

       

      We are in developing REST web service with wildfly 11. I am using Jersey 2.26 to build web services.

      Jersey has a module named jersey-gf-cdi which implements a bridge between CDI and Jersey and responsible for dependency injections. And i wanted to use this to avoid custom AbstractBindings.

      But after adding jersey-gf-cdi jar my deployment fails with the below error. So

       

      1. I would like to know if  jersey's glassfish cdi is compatible with Wildfly ? If yes, do we have a solution for the below error.

      2. Do I have any risk factors to be considered, If  I allow jersey to decide the injections ?

       

      Any help is much appreciated.

       

      java.lang.AbstractMethodError: org.glassfish.jersey.gf.cdi.internal.CdiComponentProvider.initialize(Lorg/glassfish/jersey/internal/inject/InjectionManager;)V

      at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:84)

      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.AbstractMethodError: org.glassfish.jersey.gf.cdi.internal.CdiComponentProvider.initialize(Lorg/glassfish/jersey/internal/inject/InjectionManager;)V

      at org.glassfish.jersey.server.ComponentProviderConfigurator.lambda$null$0(ComponentProviderConfigurator.java:79)

      at java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:372)

      at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)

      at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1380)

      at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)

      at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)

      at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)

      at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)

      at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)

      at org.glassfish.jersey.server.ComponentProviderConfigurator.lambda$init$1(ComponentProviderConfigurator.java:80)

      at org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:341)

      at org.glassfish.jersey.server.ResourceModelConfigurator.bindProvidersAndResources(ResourceModelConfigurator.java:135)

      at org.glassfish.jersey.server.ResourceModelConfigurator.init(ResourceModelConfigurator.java:87)

      at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:365)

      at org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$1(ApplicationHandler.java:316)

      at org.glassfish.jersey.internal.Errors.process(Errors.java:316)

      at org.glassfish.jersey.internal.Errors.process(Errors.java:298)

      at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:256)

      at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:315)

      at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:282)

      at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:335)

      at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:178)

      at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:370)

      at javax.servlet.GenericServlet.init(GenericServlet.java:244)

      at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)

      at org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)

      at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)

      at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:250)

      at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:133)

      at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:565)

      at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:536)

      at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)

      at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)

      at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)

      at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)

      at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)

      at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)

      at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)

      at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)

      at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:578)

      at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)

      at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:81)

      ... 6 more