Return-Path: X-Original-To: apmail-deltaspike-users-archive@www.apache.org Delivered-To: apmail-deltaspike-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6CA0B1000B for ; Tue, 25 Nov 2014 13:28:12 +0000 (UTC) Received: (qmail 50727 invoked by uid 500); 25 Nov 2014 13:28:12 -0000 Delivered-To: apmail-deltaspike-users-archive@deltaspike.apache.org Received: (qmail 50703 invoked by uid 500); 25 Nov 2014 13:28:12 -0000 Mailing-List: contact users-help@deltaspike.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@deltaspike.apache.org Delivered-To: mailing list users@deltaspike.apache.org Received: (qmail 50686 invoked by uid 99); 25 Nov 2014 13:28:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Nov 2014 13:28:11 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of deven.phillips@gmail.com designates 209.85.223.169 as permitted sender) Received: from [209.85.223.169] (HELO mail-ie0-f169.google.com) (209.85.223.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Nov 2014 13:27:43 +0000 Received: by mail-ie0-f169.google.com with SMTP id y20so487271ier.28 for ; Tue, 25 Nov 2014 05:25:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=B2W23UQOyEA1RMyq1JCmVd3Kf5C4FdxIfIWMPQvGdqI=; b=ILYrSR9hZyv4Ap3JMcJFinRcn5842C+xjxjM6hkrx02zW7N9Hf2/2CGQ7VE8+sqznb Lc9AC9h26m/GQWFSPYVYbR1Zr4u7mkCQXRmMeF9bZnux4pcmuhycMdsfqyx4IAw/eumF t2AyY00xT68Ihh/Yyp9rW9CtEy4adk1lwfhimkNtbEAbneBlNrZ0AuUud+n4knrfyEjG IZyleXtcVjwmaNw9NlJflCQ7dfibg4ygse00QC2353tRT/q7W1wRdV+KZ4woQIXm9AJB Av65A5p4z3RfLDRXmuf3xf0SZR8ORHcNoEZcc2Sd/4x53qo4wiGEytbXs4dM4Xs4WqRC u1/A== MIME-Version: 1.0 X-Received: by 10.50.98.101 with SMTP id eh5mr17458882igb.31.1416921927094; Tue, 25 Nov 2014 05:25:27 -0800 (PST) Received: by 10.107.7.167 with HTTP; Tue, 25 Nov 2014 05:25:26 -0800 (PST) In-Reply-To: References: Date: Tue, 25 Nov 2014 08:25:26 -0500 Message-ID: Subject: Re: Jetty/Jersey/Injection From: Deven Phillips To: users@deltaspike.apache.org Content-Type: multipart/alternative; boundary=047d7b2e0d85239d850508aed859 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b2e0d85239d850508aed859 Content-Type: text/plain; charset=UTF-8 John, That is AWESOME.. I'll have a look after my morning meetings and give it a shot... Thanks much!! Deven On Mon, Nov 24, 2014 at 6:39 PM, John D. Ament wrote: > Haha! Looks to be a gradle issue actually, or at least the way gradle > builds a classpath when trying to run an application. > > After digging through this a bit more, I noticed that I wasn't seeing > any bean definitions for your classes. I wasn't seeing the cdi > injector being fired. Note the following classpath entries: > > > /Users/johnament/src/JettyJerseyWeldExample/build/classes/main:/Users/johnament/src/JettyJerseyWeldExample/build/resources/main > > Weld will interpret these as two different JARs - one that has a > beans.xml and one that doesn't. > > I added the following to your build.gradle: > > > sourceSets { > main { > //if you truly want to override the defaults: > output.resourcesDir = 'build/out' > output.classesDir = 'build/out' > } > } > > > and finally when I ran, I got this log message: > > [DEBUG] 2014-11-24 18:35:28,552 [main] > org.jboss.resteasy.cdi.ResteasyCdiExtension:68 - Discovered CDI bean > which is a JAX-RS resource com.zanclus.example.api.GetServerTime. > > [DEBUG] 2014-11-24 18:35:28,552 [main] > org.jboss.resteasy.cdi.ResteasyCdiExtension:68 - Bean class > com.zanclus.example.api.GetServerTime has a scope defined. > > which made me smile (always glad to see my old code floating around). > Now you can inject your rest dependencies. > > I've put out a gist with the final build.gradle that made this work: > > https://gist.github.com/johnament/444d430afff078de0cc6 > > On Mon, Nov 24, 2014 at 1:11 PM, John D. Ament > wrote: > > I think I figured out the "how to run" part. I added an application > > plugin to the build.gradle and it starts. > > > > It looks like your issue is much more of a resteasy problem rather > > than a CDI problem. Let me poke at it more, however you may want to > > mail resteasy-users as well (I'm also on that list). > > > > John > > > > On Mon, Nov 24, 2014 at 10:38 AM, Deven Phillips > > wrote: > >> John, > >> > >> I have been running it from either NetBeans or IntelliJ using their > >> gradle plugins... You could potentially run from the CLI using a > JavaExec > >> task inside of Gradle. I will try to add one to the project today and > get > >> back with you on how to run it.. > >> > >> Thanks, > >> > >> Deven > >> > >> On Sat, Nov 22, 2014 at 10:11 AM, John D. Ament > > >> wrote: > >> > >>> It's a bit hard to compile your code since you're using lombok and > gradle, > >>> any build instructions you might want to share? How do I create a > runnable > >>> app with this? > >>> > >>> Looking at what you're building against, I wouldn't recommend including > >>> both weld-se and weld-servlet in your bundle. > >>> On Sat Nov 22 2014 at 6:19:28 AM Deven Phillips < > deven.phillips@gmail.com> > >>> wrote: > >>> > >>> > To answer: > >>> > > >>> > 1. JavaEE application servers are not on our approved software list > and I > >>> > was told that the would not likely be approved in the near future. > >>> > > >>> > 2. I don't see how starting with a WAR and using a > WebApplicationContext > >>> > would make any difference in whether injections work... Regardless, > it > >>> > would mean having to separate the application and the server again > >>> (Create > >>> > the WAR, deploy to Jetty) and we are trying to avoid that. > >>> > > >>> > Thanks in advance, > >>> > > >>> > Deven > >>> > > >>> > On Fri, Nov 21, 2014 at 4:22 PM, Jason Porter < > lightguard.jp@gmail.com> > >>> > wrote: > >>> > > >>> > > I have to say I'm not familiar at all with using Jetty this way. Is > >>> > there a > >>> > > reason for doing this instead of 1) starting the server and > deploying a > >>> > WAR > >>> > > or 2) using a WebAppContext? > >>> > > > >>> > > On Fri, Nov 21, 2014 at 12:42 PM, Deven Phillips < > >>> > deven.phillips@gmail.com > >>> > > > > >>> > > wrote: > >>> > > > >>> > > > OK, I think that I have a project which can run, but I am still > >>> getting > >>> > > > NPEs for the injected resource. > >>> > > > > >>> > > > On Fri, Nov 21, 2014 at 2:13 PM, Deven Phillips < > >>> > > deven.phillips@gmail.com> > >>> > > > wrote: > >>> > > > > >>> > > > > And by working, I mean it compiles.. I do not mean that the > >>> > Dependency > >>> > > > > Injection is working. > >>> > > > > > >>> > > > > On Fri, Nov 21, 2014 at 2:13 PM, Deven Phillips < > >>> > > > deven.phillips@gmail.com> > >>> > > > > wrote: > >>> > > > > > >>> > > > >> OK, I created a branch called DeltaSpike which is now > working... > >>> > Sorry > >>> > > > >> for wasting your time with a broken source tree!! > >>> > > > >> > >>> > > > >> Deven > >>> > > > >> > >>> > > > >> On Fri, Nov 21, 2014 at 2:04 PM, Deven Phillips < > >>> > > > deven.phillips@gmail.com > >>> > > > >> > wrote: > >>> > > > >> > >>> > > > >>> I've never needed an "Application" class before while using > Guice > >>> > or > >>> > > > >>> manually configuring JAX-RS with Jetty.. I will check to see > if > >>> > that > >>> > > > makes > >>> > > > >>> a difference... > >>> > > > >>> > >>> > > > >>> Deven > >>> > > > >>> > >>> > > > >>> On Fri, Nov 21, 2014 at 1:37 PM, Jason Porter < > >>> > > lightguard.jp@gmail.com > >>> > > > > > >>> > > > >>> wrote: > >>> > > > >>> > >>> > > > >>>> Maybe I missed something, but why are you going through all > the > >>> > > > trouble > >>> > > > >>>> of > >>> > > > >>>> starting the server and setting everything up manually? I > still > >>> > > don't > >>> > > > >>>> see > >>> > > > >>>> any JAX-RS config or JAX-RS Application class. > >>> > > > >>>> > >>> > > > >>>> On Fri, Nov 21, 2014 at 11:30 AM, Deven Phillips < > >>> > > > >>>> deven.phillips@gmail.com> > >>> > > > >>>> wrote: > >>> > > > >>>> > >>> > > > >>>> > I see what happened... I meant to create a separate branch > >>> for a > >>> > > > >>>> WeldSE > >>> > > > >>>> > implementation and failed.. Checkout the tag 'deltaspike' > >>> > > > >>>> > > >>> > > > >>>> > Deven > >>> > > > >>>> > > >>> > > > >>>> > On Fri, Nov 21, 2014 at 1:27 PM, Deven Phillips < > >>> > > > >>>> deven.phillips@gmail.com> > >>> > > > >>>> > wrote: > >>> > > > >>>> > > >>> > > > >>>> > > John, > >>> > > > >>>> > > > >>> > > > >>>> > > Have a look at com.zanclus.example.api.GetServerTime > >>> > > > >>>> > > > >>> > > > >>>> > > Deven > >>> > > > >>>> > > > >>> > > > >>>> > > On Fri, Nov 21, 2014 at 11:41 AM, John D. Ament < > >>> > > > >>>> john.d.ament@gmail.com> > >>> > > > >>>> > > wrote: > >>> > > > >>>> > > > >>> > > > >>>> > >> Deven, > >>> > > > >>>> > >> > >>> > > > >>>> > >> Looks like there's no JAX-RS resources in this > project... > >>> > > > >>>> > >> > >>> > > > >>>> > >> On Fri Nov 21 2014 at 10:08:34 AM Deven Phillips < > >>> > > > >>>> > >> deven.phillips@gmail.com> > >>> > > > >>>> > >> wrote: > >>> > > > >>>> > >> > >>> > > > >>>> > >> > I finally got around to trying to put together an > example > >>> > > > project > >>> > > > >>>> > which > >>> > > > >>>> > >> I > >>> > > > >>>> > >> > could share publicly... > >>> > > > >>>> > >> > > >>> > > > >>>> > >> > https://github.com/InfoSec812/JettyJerseyWeldExample > >>> > > > >>>> > >> > > >>> > > > >>>> > >> > I'm hoping I can figure out how to get > DeltaSpike/Weld to > >>> > > work > >>> > > > >>>> > injecting > >>> > > > >>>> > >> > dependencies into my JAX-RS POJOs... > >>> > > > >>>> > >> > > >>> > > > >>>> > >> > On Mon, Nov 17, 2014 at 9:58 AM, Deven Phillips < > >>> > > > >>>> > >> deven.phillips@gmail.com> > >>> > > > >>>> > >> > wrote: > >>> > > > >>>> > >> > > >>> > > > >>>> > >> > > Creating the ServletContextHandler now looks like: > >>> > > > >>>> > >> > > > >>> > > > >>>> > >> > > ServletContextHandler handler = new > >>> > > > >>>> ServletContextHandler(); > >>> > > > >>>> > >> > > handler.setContextPath("/"); > >>> > > > >>>> > >> > > handler.addFilter(ProxyAuthFilter.class, > "/*", > >>> > > > >>>> > >> > > EnumSet.allOf(DispatcherType.class)); > >>> > > > >>>> > >> > > handler.addEventListener(new > >>> > > > >>>> BeanManagerResourceBindingList > >>> > > > >>>> > >> > ener()); > >>> > > > >>>> > >> > > handler.addEventListener(new > >>> > > > >>>> CdiServletRequestListener()); > >>> > > > >>>> > >> > > handler.addServlet(new ServletHolder(new > >>> > > > >>>> > ServletContainer(new > >>> > > > >>>> > >> > > PackagesResourceConfig(config.restPackage()))), > "/*"); > >>> > > > >>>> > >> > > > >>> > > > >>>> > >> > > > >>> > > > >>>> > >> > > And the exception is an NPE in one of my JAX-RS > POJOs > >>> > where > >>> > > > it > >>> > > > >>>> tries > >>> > > > >>>> > >> to > >>> > > > >>>> > >> > > access a supposedly injected resource. > >>> > > > >>>> > >> > > > >>> > > > >>>> > >> > > DEven > >>> > > > >>>> > >> > > > >>> > > > >>>> > >> > > On Mon, Nov 17, 2014 at 9:54 AM, Deven Phillips < > >>> > > > >>>> > >> > deven.phillips@gmail.com> > >>> > > > >>>> > >> > > wrote: > >>> > > > >>>> > >> > > > >>> > > > >>>> > >> > >> OK, the @Target exception was a classpath problem > and > >>> I > >>> > > have > >>> > > > >>>> > resolved > >>> > > > >>>> > >> > it, > >>> > > > >>>> > >> > >> but I am still getting NullPointerExceptions > because > >>> > > nothing > >>> > > > >>>> is > >>> > > > >>>> > >> getting > >>> > > > >>>> > >> > >> injected into my JAX-RS classes... > >>> > > > >>>> > >> > >> > >>> > > > >>>> > >> > >> On Mon, Nov 17, 2014 at 9:28 AM, Deven Phillips < > >>> > > > >>>> > >> > deven.phillips@gmail.com > >>> > > > >>>> > >> > >> > wrote: > >>> > > > >>>> > >> > >> > >>> > > > >>>> > >> > >>> So, I just tried this: > >>> > > > >>>> > >> > >>> > >>> > > > >>>> > >> > >>> WebAppContext ctx = new > >>> > > > >>>> WebAppContext("cc-backend-sungardas", > >>> > > > >>>> > >> > "/"); > >>> > > > >>>> > >> > >>> ctx.addFilter(ProxyAuthFilter.class, "/*", > >>> > > > >>>> > >> > >>> EnumSet.allOf(DispatcherType.class)); > >>> > > > >>>> > >> > >>> ctx.addServlet(new ServletHolder(new > >>> > > > ServletContainer(new > >>> > > > >>>> > >> > >>> PackagesResourceConfig(config.restPackage()))), > >>> "/*"); > >>> > > > >>>> > >> > >>> ctx.addEventListener(new > >>> > > > >>>> > BeanManagerResourceBindingListener()); > >>> > > > >>>> > >> > >>> > >>> > > > >>>> > >> > >>> and I got the following Exceptions: > >>> > > > >>>> > >> > >>> > >>> > > > >>>> > >> > >>> [DEBUG] 2014-11-17 09:25:44,821 [main] > >>> > > > >>>> > >> > org.jboss.weld.Reflection:82 > >>> > > > >>>> > >> > >>> - WELD-000620: interface > javax.ws.rs.core.Context is > >>> > not > >>> > > > >>>> declared > >>> > > > >>>> > >> > >>> @Target(METHOD, FIELD, PARAMETER, TYPE). Weld > will > >>> use > >>> > > this > >>> > > > >>>> > >> annotation, > >>> > > > >>>> > >> > >>> however this may make the application unportable. > >>> > > > >>>> > >> > >>> Exception in thread "main" > >>> > > > >>>> > >> > >>> org.jboss.weld.exceptions.DefinitionException: > >>> > Exception > >>> > > > List > >>> > > > >>>> > with 1 > >>> > > > >>>> > >> > >>> exceptions: > >>> > > > >>>> > >> > >>> Exception 0 : > >>> > > > >>>> > >> > >>> javax.enterprise.event.ObserverException > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > >>> > > > >>>> > >> > >>> Method) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> > >>> sun.reflect.NativeConstructorAccessorImpl.newInstance( > >>> > > > >>>> > >> > NativeConstructorAccessorImpl.java:57) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> > >>> > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance( > >>> > > > >>>> > >> > DelegatingConstructorAccessorImpl.java:45) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > java.lang.reflect.Constructor.newInstance(Constructor.java: > >>> > 526) > >>> > > > >>>> > >> > >>> at > java.lang.Class.newInstance(Class.java:379) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> org.jboss.weld.security.NewInstanceAction.run( > >>> > > > >>>> > >> > NewInstanceAction.java:33) > >>> > > > >>>> > >> > >>> at > java.security.AccessController.doPrivileged( > >>> > Native > >>> > > > >>>> Method) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> > org.jboss.weld.injection.Exceptions.rethrowException( > >>> > > > >>>> > >> > Exceptions.java:40) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> > org.jboss.weld.injection.Exceptions.rethrowException( > >>> > > > >>>> > >> > Exceptions.java:78) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> org.jboss.weld.injection.MethodInjectionPoint. > >>> > > > >>>> > >> > > >>> > > invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:98) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> > org.jboss.weld.event.ObserverMethodImpl.sendEvent( > >>> > > > >>>> > >> > ObserverMethodImpl.java:271) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> > >>> > > org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent( > >>> > > > >>>> > >> > ExtensionObserverMethodImpl.java:121) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> > org.jboss.weld.event.ObserverMethodImpl.sendEvent( > >>> > > > >>>> > >> > ObserverMethodImpl.java:258) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> org.jboss.weld.event.ObserverMethodImpl.notify( > >>> > > > >>>> > >> > ObserverMethodImpl.java:237) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> > org.jboss.weld.event.ObserverNotifier.notifyObserver( > >>> > > > >>>> > >> > ObserverNotifier.java:174) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> > >>> org.jboss.weld.event.ObserverNotifier.notifyObservers( > >>> > > > >>>> > >> > ObserverNotifier.java:133) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> org.jboss.weld.event.ObserverNotifier.fireEvent( > >>> > > > >>>> > >> > ObserverNotifier.java:107) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> org.jboss.weld.bootstrap. > >>> > events.AbstractContainerEvent. > >>> > > > >>>> > >> > fire(AbstractContainerEvent.java:54) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> > >>> > > > >>>> > >> > >>> > > > >>>> > >>> > > > org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire( > >>> > > > >>>> > >> > AbstractDefinitionContainerEvent.java:42) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> org.jboss.weld.bootstrap. > >>> > events.AfterBeanDiscoveryImpl. > >>> > > > >>>> > >> > fire(AfterBeanDiscoveryImpl.java:59) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> > >>> > > > >>>> > >> > >>> > > > >>>> > >>> > > > org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:412) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> > org.jboss.weld.bootstrap.WeldBootstrap.deployBeans( > >>> > > > >>>> > >> > WeldBootstrap.java:83) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> > >>> > > > >>>> > >> > >>> > > > >>>> > >>> > > > org.jboss.weld.bootstrap.api.helpers.ForwardingBootstrap.deployBeans( > >>> > > > >>>> > >> > ForwardingBootstrap.java:63) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > > org.jboss.weld.environment.se.Weld.initialize(Weld.java:133) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> > >>> org.apache.deltaspike.cdise.weld.WeldContainerControl. > >>> > > > >>>> > >> > boot(WeldContainerControl.java:65) > >>> > > > >>>> > >> > >>> at com.sungardas.cc.edison.Main. > >>> > start(Main.java:171) > >>> > > > >>>> > >> > >>> at > >>> com.sungardas.cc.edison.Main.main(Main.java:68) > >>> > > > >>>> > >> > >>> Caused by: java.lang.NoSuchMethodError: > >>> > > > >>>> > >> > >>> > org.jboss.weld.context.AbstractUnboundContext.( > >>> > Z)V > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> > >>> > > > org.jboss.weld.environment.se.contexts.ThreadContext.( > >>> > > > >>>> > >> > ThreadContext.java:40) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> > org.jboss.weld.environment.se.WeldSEBeanRegistrant. > >>> > > > >>>> > >> > registerWeldSEContexts(WeldSEBeanRegistrant.java:49) > >>> > > > >>>> > >> > >>> 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.jboss.weld.injection.MethodInjectionPoint. > >>> > > > >>>> > >> > > >>> > > invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:90) > >>> > > > >>>> > >> > >>> ... 17 more > >>> > > > >>>> > >> > >>> > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> > >>> > > > >>>> > >> > >>> > > > >>>> > >>> > > > org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire( > >>> > > > >>>> > >> > AbstractDefinitionContainerEvent.java:44) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> org.jboss.weld.bootstrap. > >>> > events.AfterBeanDiscoveryImpl. > >>> > > > >>>> > >> > fire(AfterBeanDiscoveryImpl.java:59) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> > >>> > > > >>>> > >> > >>> > > > >>>> > >>> > > > org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:412) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> > org.jboss.weld.bootstrap.WeldBootstrap.deployBeans( > >>> > > > >>>> > >> > WeldBootstrap.java:83) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> > >>> > > > >>>> > >> > >>> > > > >>>> > >>> > > > org.jboss.weld.bootstrap.api.helpers.ForwardingBootstrap.deployBeans( > >>> > > > >>>> > >> > ForwardingBootstrap.java:63) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > > org.jboss.weld.environment.se.Weld.initialize(Weld.java:133) > >>> > > > >>>> > >> > >>> at > >>> > > > >>>> > >> > >>> > >>> org.apache.deltaspike.cdise.weld.WeldContainerControl. > >>> > > > >>>> > >> > boot(WeldContainerControl.java:65) > >>> > > > >>>> > >> > >>> at com.sungardas.cc.edison.Main. > >>> > start(Main.java:171) > >>> > > > >>>> > >> > >>> at > >>> com.sungardas.cc.edison.Main.main(Main.java:68) > >>> > > > >>>> > >> > >>> > >>> > > > >>>> > >> > >>> On Mon, Nov 17, 2014 at 9:09 AM, Deven Phillips < > >>> > > > >>>> > >> > >>> deven.phillips@gmail.com> wrote: > >>> > > > >>>> > >> > >>> > >>> > > > >>>> > >> > >>>> This is embedded Jetty 9.2.x and Weld version > >>> > > 1.1.9.Final > >>> > > > >>>> booted > >>> > > > >>>> > >> using > >>> > > > >>>> > >> > >>>> DeltaSpike 1.0.2... I have seen that linked > >>> document, > >>> > > but > >>> > > > I > >>> > > > >>>> don't > >>> > > > >>>> > >> see > >>> > > > >>>> > >> > how > >>> > > > >>>> > >> > >>>> to translate that to embedded Jetty's startup... > >>> > > > Normally, I > >>> > > > >>>> > would > >>> > > > >>>> > >> do > >>> > > > >>>> > >> > >>>> something like: > >>> > > > >>>> > >> > >>>> > >>> > > > >>>> > >> > >>>> ServletContextHandler ctx = new > >>> > > > >>>> ServletContextHandler("/"); > >>> > > > >>>> > >> > >>>> ctx.addFilter(AuthFilter.class, "/*", > >>> > > > >>>> > >> > >>>> EnumSet.allOf(DispatcherType.class) > >>> > > > >>>> > >> > >>>> ctx.addServlet(new ServletContainer(new > >>> > > > >>>> > >> > >>>> PackagesResourceConfig(restPackage)); > >>> > > > >>>> > >> > >>>> ctx.addEventListener(new > CdiRequestListener()) > >>> > > > >>>> > >> > >>>> > >>> > > > >>>> > >> > >>>> Where in there would I put in the BeanManager > and > >>> the > >>> > > > >>>> > >> > >>>> ManagerObjectFactory? Or should I follow the > lines > >>> > below > >>> > > > >>>> that > >>> > > > >>>> > where > >>> > > > >>>> > >> > they > >>> > > > >>>> > >> > >>>> talk about using a listener to automatically > bind > >>> the > >>> > > > >>>> > BeanManager? > >>> > > > >>>> > >> > >>>> > >>> > > > >>>> > >> > >>>> Thanks in advance!! > >>> > > > >>>> > >> > >>>> > >>> > > > >>>> > >> > >>>> Deven > >>> > > > >>>> > >> > >>>> > >>> > > > >>>> > >> > >>>> On Sun, Nov 16, 2014 at 10:39 PM, Jason Porter < > >>> > > > >>>> > >> > lightguard.jp@gmail.com > >>> > > > >>>> > >> > >>>> > wrote: > >>> > > > >>>> > >> > >>>> > >>> > > > >>>> > >> > >>>>> Which version of weld? > >>> > > > >>>> > >> > >>>>> > >>> > > > >>>> > >> > >>>>> > >>> > > https://docs.jboss.org/weld/reference/latest/en-US/html/ > >>> > > > >>>> > >> > environments.html#_jetty > >>> > > > >>>> > >> > >>>>> should be all you need for weld in jetty. > >>> > > > >>>> > >> > >>>>> On Sun, Nov 16, 2014 at 20:28 Deven Phillips < > >>> > > > >>>> > >> > deven.phillips@gmail.com > >>> > > > >>>> > >> > >>>>> > > >>> > > > >>>> > >> > >>>>> wrote: > >>> > > > >>>> > >> > >>>>> > >>> > > > >>>> > >> > >>>>> > Hi all, > >>> > > > >>>> > >> > >>>>> > > >>> > > > >>>> > >> > >>>>> > > >>> > > > >>>> > >> > >>>>> > I'm trying really hard to figure out how > to > >>> > make > >>> > > > >>>> > >> > DeltaSpike/Weld > >>> > > > >>>> > >> > >>>>> work > >>> > > > >>>> > >> > >>>>> > with Jetty and Jersey... I can get the Jersey > >>> > servlet > >>> > > > to > >>> > > > >>>> load, > >>> > > > >>>> > >> but > >>> > > > >>>> > >> > I > >>> > > > >>>> > >> > >>>>> cannot > >>> > > > >>>> > >> > >>>>> > get any of the dependencies to be > injected... My > >>> > goal > >>> > > > is > >>> > > > >>>> to > >>> > > > >>>> > >> replace > >>> > > > >>>> > >> > >>>>> > Google's Guice DI framework so that I can > achieve > >>> > > > better > >>> > > > >>>> test > >>> > > > >>>> > >> > >>>>> coverage and > >>> > > > >>>> > >> > >>>>> > decoupling... I'm having a very hard time > finding > >>> > any > >>> > > > >>>> > >> documentation > >>> > > > >>>> > >> > >>>>> for > >>> > > > >>>> > >> > >>>>> > wiring this up.. > >>> > > > >>>> > >> > >>>>> > > >>> > > > >>>> > >> > >>>>> > Any help would be appreciated! > >>> > > > >>>> > >> > >>>>> > > >>> > > > >>>> > >> > >>>>> > Deven > >>> > > > >>>> > >> > >>>>> > > >>> > > > >>>> > >> > >>>>> > >>> > > > >>>> > >> > >>>> > >>> > > > >>>> > >> > >>>> > >>> > > > >>>> > >> > >>> > >>> > > > >>>> > >> > >> > >>> > > > >>>> > >> > > > >>> > > > >>>> > >> > > >>> > > > >>>> > >> > >>> > > > >>>> > > > >>> > > > >>>> > > > >>> > > > >>>> > > >>> > > > >>>> > >>> > > > >>>> > >>> > > > >>>> > >>> > > > >>>> -- > >>> > > > >>>> Jason Porter > >>> > > > >>>> http://en.gravatar.com/lightguardjp > >>> > > > >>>> > >>> > > > >>> > >>> > > > >>> > >>> > > > >> > >>> > > > > > >>> > > > > >>> > > > >>> > > > >>> > > > >>> > > -- > >>> > > Jason Porter > >>> > > http://en.gravatar.com/lightguardjp > >>> > > > >>> > > >>> > --047d7b2e0d85239d850508aed859--