Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Tomcat上使用Jersey和Weld CDI部署应用程序时出错_Tomcat_Jersey 2.0_Weld2 - Fatal编程技术网

在Tomcat上使用Jersey和Weld CDI部署应用程序时出错

在Tomcat上使用Jersey和Weld CDI部署应用程序时出错,tomcat,jersey-2.0,weld2,Tomcat,Jersey 2.0,Weld2,我正在使用Jersey 2.7+Weld 2.2.0+EclipseLink(JPA 2.1)开发一个web应用程序。然后我尝试用“jersey gf cdi.jar”来“粘合”cdi,但是当我尝试在Tomcat(7或8)上部署应用程序时,我得到了以下错误: 03-May-2014 18:47:26.320 SEVERE [http-nio-8084-exec-3] org.apache.catalina.core.ContainerBase.addChildInternal Conta

我正在使用Jersey 2.7+Weld 2.2.0+EclipseLink(JPA 2.1)开发一个web应用程序。然后我尝试用“jersey gf cdi.jar”来“粘合”cdi,但是当我尝试在Tomcat(7或8)上部署应用程序时,我得到了以下错误:

    03-May-2014 18:47:26.320 SEVERE [http-nio-8084-exec-3] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: 
 org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/restdemoapp]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:697)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:579)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:455)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1554)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1428)
    at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:885)
    at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:343)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:301)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:615)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:74)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1015)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:652)
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1575)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1533)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-000069: An interceptor must have at least one binding, but org.glassfish.jersey.gf.cdi.internal.CdiComponentProvider$WebApplicationExceptionPreservingInterceptor has none
    at org.jboss.weld.bean.InterceptorImpl.<init>(InterceptorImpl.java:76)
    at org.jboss.weld.bean.InterceptorImpl.of(InterceptorImpl.java:66)
    at org.jboss.weld.bootstrap.AbstractBeanDeployer.createInterceptor(AbstractBeanDeployer.java:283)
    at org.jboss.weld.bootstrap.BeanDeployer.createClassBean(BeanDeployer.java:225)
    at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$2.doWork(ConcurrentBeanDeployer.java:78)
    at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$2.doWork(ConcurrentBeanDeployer.java:75)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    ... 3 more

03-May-2014 18:47:26.321 SEVERE [http-nio-8084-exec-3] org.apache.catalina.startup.HostConfig.deployDescriptor Error deploying configuration descriptor /home/oscar/.netbeans/8.0/apache-tomcat-8.0.3.0_base/conf/Catalina/localhost/restdemoapp.xml
 java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/restdemoapp]]
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:697)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:579)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:455)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1554)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1428)
    at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:885)
    at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:343)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:301)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:615)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:74)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1015)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:652)
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1575)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1533)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
03-May-2014 18:47:26.320严重[http-nio-8084-exec-3]org.apache.catalina.core.ContainerBase.addChild内部ContainerBase.addChild:开始:
org.apache.catalina.LifecycleException:无法启动组件[StandardEngine[catalina].StandardHost[localhost].StandardContext[/restdemoapp]]
位于org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
位于org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
位于org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
位于org.apache.catalina.core.StandardHost.addChild(StandardHost.java:697)
位于org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:579)
位于org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:455)
位于org.apache.catalina.startup.HostConfig.check(HostConfig.java:1554)
在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处
在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)中
在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)中
位于java.lang.reflect.Method.invoke(Method.java:606)
位于org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
位于com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
位于com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
位于org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1428)
位于org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:885)
位于org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:343)
位于javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
位于javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
位于org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:301)
位于org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
位于org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
位于org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
位于org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
位于org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
位于org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
位于org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
位于org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
位于org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
位于org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
位于org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
位于org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
位于org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:615)
位于org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
位于org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:74)
位于org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
位于org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
位于org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)
位于org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1015)
位于org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:652)
位于org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
位于org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1575)
位于org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1533)
位于java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
位于java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
运行(Thread.java:744)
原因:org.jboss.weld.exceptions.DeploymentException:weld-000069:拦截器必须至少有一个绑定,但org.glassfish.jersey.gf.cdi.internal.CdiComponentProvider$WebApplicationExceptionPreservingInterceptor没有绑定
在org.jboss.weld.bean.InterceptorImpl上(InterceptorImpl.java:76)
位于org.jboss.weld.bean.InterceptorImpl.of(InterceptorImpl.java:66)
位于org.jboss.weld.bootstrap.AbstractBeanDeployer.createInterceptor(AbstractBeanDeployer.java:283)
位于org.jboss.weld.bootstrap.BeanDeployer.createClassBean(BeanDeployer.java:225)
位于org.jboss.weld.bootstrap.ConcurrentBeanDeployer$2.doWork(ConcurrentBeanDeployer.java:78)
位于org.jboss.weld.bootstrap.ConcurrentBeanDeployer$2.doWork(ConcurrentBeanDeployer.java:75)
在org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
在org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
在java.util.concurrent.FutureTask.run(FutureTask.java:262)处
... 3个以上
2014年5月3日18:47:26.321严重[http-nio-8084-exec-3]org.apache.catalina.startup.HostConfig.deployDescriptor错误部署配置描述符/home/oscar/.netbeans/8.0/apache-tomcat-8.0.3.0_base/conf/catalina/localhost/restdemoapp.xml
java.lang.IllegalStateException:ContainerBase.addChild:start:org.apache.catalina.LifecycleExce
type Exception report

message A MultiException has 5 exceptions. They are:

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: A MultiException has 5 exceptions.  They are:
1. org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at Injectee(requiredType=Logger,parent=FacebookController,qualifiers={}),position=-1,optional=false,self=false,unqualified=null,1428967997)
2. org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at Injectee(requiredType=GenericDAO<User>,parent=FacebookController,qualifiers={}),position=-1,optional=false,self=false,unqualified=null,1401771270)
3. org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at Injectee(requiredType=Authenticator,parent=FacebookController,qualifiers={@com.restdemoapp.domain.oauth.cdi.Providers(value=FACEBOOK)}),position=-1,optional=false,self=false,unqualified=null,726788106)
4. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of com.restdemoapp.service.social.FacebookController errors were found
5. java.lang.IllegalStateException: Unable to perform operation: resolve on com.restdemoapp.service.social.FacebookController

    org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:392)
    org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381)
    org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:344)
    org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:219)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
    com.restdemoapp.web.AuthFilter.doFilter(AuthFilter.java:30)

root cause

A MultiException has 5 exceptions.  They are:
1. org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at Injectee(requiredType=Logger,parent=FacebookController,qualifiers={}),position=-1,optional=false,self=false,unqualified=null,1428967997)
2. org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at Injectee(requiredType=GenericDAO<User>,parent=FacebookController,qualifiers={}),position=-1,optional=false,self=false,unqualified=null,1401771270)
3. org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at Injectee(requiredType=Authenticator,parent=FacebookController,qualifiers={@com.restdemoapp.domain.oauth.cdi.Providers(value=FACEBOOK)}),position=-1,optional=false,self=false,unqualified=null,726788106)
4. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of com.restdemoapp.service.social.FacebookController errors were found
5. java.lang.IllegalStateException: Unable to perform operation: resolve on com.restdemoapp.service.social.FacebookController

    org.jvnet.hk2.internal.Collector.throwIfErrors(Collector.java:88)
    org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:270)
    org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:414)
    org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456)
    org.glassfish.jersey.process.internal.RequestScope.findOrCreate(RequestScope.java:160)
    org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2445)
    org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:621)
    org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:606)
    org.glassfish.jersey.internal.inject.Injections.getOrCreate(Injections.java:173)
    org.glassfish.jersey.server.model.MethodHandler$ClassBasedMethodHandler.getInstance(MethodHandler.java:185)
    org.glassfish.jersey.server.internal.routing.PushMethodHandlerRouter.apply(PushMethodHandlerRouter.java:103)
    org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:128)
    org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:131)
    org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:131)
    org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:131)
    org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:131)
    org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:110)
    org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:65)
    org.glassfish.jersey.process.internal.Stages.process(Stages.java:197)
    org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:250)
    org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
    org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
    org.glassfish.jersey.internal.Errors.process(Errors.java:315)
    org.glassfish.jersey.internal.Errors.process(Errors.java:297)
    org.glassfish.jersey.internal.Errors.process(Errors.java:267)
    org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:320)
    org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:236)
    org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028)
    org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:373)
    org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381)
    org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:344)
    org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:219)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
    com.restdemoapp.web.AuthFilter.doFilter(AuthFilter.java:30)

root cause

org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at Injectee(requiredType=Logger,parent=FacebookController,qualifiers={}),position=-1,optional=false,self=false,unqualified=null,1428967997)
    org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:74)
    org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:232)
    org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:255)
    org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:414)
    org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456)
    org.glassfish.jersey.process.internal.RequestScope.findOrCreate(RequestScope.java:160)
    org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2445)
    org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:621)
    org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:606)
    org.glassfish.jersey.internal.inject.Injections.getOrCreate(Injections.java:173)
    org.glassfish.jersey.server.model.MethodHandler$ClassBasedMethodHandler.getInstance(MethodHandler.java:185)
    org.glassfish.jersey.server.internal.routing.PushMethodHandlerRouter.apply(PushMethodHandlerRouter.java:103)
    org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:128)
    org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:131)
    org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:131)
    org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:131)
    org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:131)
    org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:110)
    org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:65)
    org.glassfish.jersey.process.internal.Stages.process(Stages.java:197)
    org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:250)
    org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
    org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
    org.glassfish.jersey.internal.Errors.process(Errors.java:315)
    org.glassfish.jersey.internal.Errors.process(Errors.java:297)
    org.glassfish.jersey.internal.Errors.process(Errors.java:267)
    org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:320)
    org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:236)
    org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028)
    org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:373)
    org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381)
    org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:344)
    org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:219)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
    com.restdemoapp.web.AuthFilter.doFilter(AuthFilter.java:30)
    <dependency>
        <groupId>org.jboss.spec.javax.transaction</groupId>
        <artifactId>jboss-transaction-api_1.2_spec</artifactId>
        <version>1.0.0.Final</version>
    </dependency>    
package com.swapstickers;

import com.swapstickers.service.TraderService;
import com.swapstickers.service.UserService;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import org.glassfish.hk2.utilities.binding.AbstractBinder;

/**
 *
 * @author oscar
 */
public class AppBinder extends AbstractBinder {

    private static final Logger LOGGER = Logger.getLogger(AppBinder.class.getName());

    @Override
    protected void configure() {
        // Weld CDI
        BeanManager bm = beanManagerFromJndi();
        bind(getBean(bm, TraderService.class)).to(TraderService.class);
        bind(getBean(bm, UserService.class)).to(UserService.class);
    }

    /* Methods to integrate the Jersey CDI with Weld CDI. */

    private <T> T getBean(BeanManager bm, Class<T> clazz) {
        Bean<T> bean = (Bean<T>) bm.getBeans(clazz).iterator().next();
        CreationalContext<T> ctx = bm.createCreationalContext(bean);
        return (T) bm.getReference(bean, clazz, ctx); 
    }

    private static BeanManager beanManagerFromJndi() {
        try {
            return (BeanManager)new InitialContext().lookup("java:comp/BeanManager");
        } catch (NamingException ignored) {
            return beanManagerFromTomcatLocation();
        }
    }

    private static BeanManager beanManagerFromTomcatLocation() {
        try {
            return (BeanManager)new InitialContext().lookup("java:comp/env/BeanManager");
        } catch (NamingException ex) {
            LOGGER.log(Level.SEVERE, "CDI Bean Manager JNDI Lookup failed!", ex);
            return null;
        }
    }       
}