When you do this..

@Typed
@Named("pf_orderCustomerPointOfContactController")
@SessionScoped
public class pf_OrderCustomerPointOfContactController extends
pf_PointOfContactController {

The injection point should be

@Inject @Named("pf_orderCustomerPointOfContactController")
private Object obj;

The reason is that you don't specify any classes in @Typed so it can't be
referenced as any type (other than Object).

I'm still strongly favoring that you ignore what the primefaces guy said.

John


On Mon, May 20, 2013 at 9:37 AM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:

> Okay, that is what I was doing wrong. maybe, just before you clicked the
> Send button and sent your last response (below), I thought about checking
> the class definition. Here is the class definition below.
>
> @Typed
> @Named("pf_orderCustomerPointOfContactController")
> @SessionScoped
> public class pf_OrderCustomerPointOfContactController extends
> pf_PointOfContactController {
>
> So, evidently, my bean-member definition was incorrect, so I have corrected
> it as follows,
>
>     @Inject
>     private pf_OrderCustomerPointOfContactController
> orderCustomerPointOfContactController;
>
> This bean member is referenced by another/primary bean class called
> pf_OrdersController. After removing '@Typed...'  from the injected bean
> member, I still get the following error:
>
> May 20, 2013 9:32:43 AM org.apache.openejb.cdi.OpenEJBLifecycle
> startApplication
> SEVERE: CDI Beans module deployment failed
> javax.enterprise.inject.UnsatisfiedResolutionException: Api type
> [jsf.orderCustomerPointOfContact.pf_OrderCustomerPointOfContactController]
> is not found with the qualifiers
> Qualifiers: [@javax.enterprise.inject.Default()]
> for injection into Field Injection Point, field name :
>  orderCustomerPointOfContactController, Bean Owner : [pf_OrdersController,
> Name:pf_ordersController, WebBeans Type:MANAGED, API
>
> Types:[java.lang.Object,jsf.orders.pf_OrdersController,java.io.Serializable],
>
> Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> at
>
> org.apache.webbeans.util.InjectionExceptionUtil.throwUnsatisfiedResolutionException(InjectionExceptionUtil.java:77)
> at
>
> org.apache.webbeans.container.InjectionResolver.getInjectionPointBean(InjectionResolver.java:238)
> at
>
> org.apache.webbeans.util.WebBeansUtil.isPassivationCapableDependency(WebBeansUtil.java:1573)
> at
>
> org.apache.webbeans.config.DeploymentValidationService.validatePassivationCapableDependencies(DeploymentValidationService.java:170)
> at
>
> org.apache.webbeans.config.DeploymentValidationService.validatePassivationCapable(DeploymentValidationService.java:127)
> at
>
> org.apache.webbeans.config.BeansDeployer.checkPassivationScope(BeansDeployer.java:748)
> at
> org.apache.webbeans.config.BeansDeployer.validate(BeansDeployer.java:428)
> at
>
> org.apache.webbeans.config.BeansDeployer.validateInjectionPoints(BeansDeployer.java:390)
> at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:194)
> at
>
> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:182)
> at
>
> org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:158)
> at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:43)
> at
>
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:793)
> at
>
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:608)
> at
>
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1111)
> at
>
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:974)
> at
>
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:124)
> at
>
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
> at
>
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
> at
>
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> at
>
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
> at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
> at
> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1654)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> 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:722)
>
>
>
>
>
> On Mon, May 20, 2013 at 9:26 AM, John D. Ament <john.d.am...@gmail.com
> >wrote:
>
> > @Typed isn't a qualifier.  It goes on the class definition, not on the
> > injection point.
> >
> > @Typed(pf_OrderCustomerPointOfContactController.class)
> > public class pf_OrderCustomerPointOfContactController extends
> > WhateverBaseClass {
> > ..
> > }
> >
> >
> > On Mon, May 20, 2013 at 9:23 AM, Howard W. Smith, Jr. <
> > smithh032...@gmail.com> wrote:
> >
> > > As you suggested, I just added/modified the code, so the code now is as
> > > follows:
> > >
> > >     @Inject @Typed(pf_OrderCustomerPointOfContactController.class)
> > >     private pf_OrderCustomerPointOfContactController
> > > orderCustomerPointOfContactController;
> > >
> > > which still results in the following (which prevents OWB starting):
> > >
> > > SEVERE: CDI Beans module deployment failed
> > > javax.enterprise.inject.UnsatisfiedResolutionException: Api type
> > >
> >
> [jsf.orderCustomerPointOfContact.pf_OrderCustomerPointOfContactController]
> > > is not found with the qualifiers
> > > Qualifiers: [@javax.enterprise.inject.Default()]
> > > for injection into Field Injection Point, field name :
> > >  orderCustomerPointOfContactController, Bean Owner :
> > [pf_OrdersController,
> > > Name:pf_ordersController, WebBeans Type:MANAGED, API
> > >
> > >
> >
> Types:[java.io.Serializable,java.lang.Object,jsf.orders.pf_OrdersController],
> > >
> > >
> >
> Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> > > at
> > >
> > >
> >
> org.apache.webbeans.util.InjectionExceptionUtil.throwUnsatisfiedResolutionException(InjectionExceptionUtil.java:77)
> > > at
> > >
> > >
> >
> org.apache.webbeans.container.InjectionResolver.getInjectionPointBean(InjectionResolver.java:238)
> > > at
> > >
> > >
> >
> org.apache.webbeans.util.WebBeansUtil.isPassivationCapableDependency(WebBeansUtil.java:1573)
> > > at
> > >
> > >
> >
> org.apache.webbeans.config.DeploymentValidationService.validatePassivationCapableDependencies(DeploymentValidationService.java:170)
> > > at
> > >
> > >
> >
> org.apache.webbeans.config.DeploymentValidationService.validatePassivationCapable(DeploymentValidationService.java:127)
> > > at
> > >
> > >
> >
> org.apache.webbeans.config.BeansDeployer.checkPassivationScope(BeansDeployer.java:748)
> > > at
> > >
> org.apache.webbeans.config.BeansDeployer.validate(BeansDeployer.java:428)
> > > at
> > >
> > >
> >
> org.apache.webbeans.config.BeansDeployer.validateInjectionPoints(BeansDeployer.java:390)
> > > at
> > org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:194)
> > > at
> > >
> > >
> >
> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:182)
> > > at
> > >
> > >
> >
> org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:158)
> > > at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:43)
> > > at
> > >
> > >
> >
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:793)
> > > at
> > >
> > >
> >
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:608)
> > > at
> > >
> > >
> >
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1111)
> > > at
> > >
> > >
> >
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:974)
> > > at
> > >
> > >
> >
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:124)
> > > at
> > >
> > >
> >
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
> > > at
> > >
> > >
> >
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
> > > at
> > >
> > >
> >
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269)
> > > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> > > at
> > >
> > >
> >
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
> > > at
> > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
> > > at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
> > > at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
> > > at
> > >
> >
> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1654)
> > > at
> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> > > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> > > at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> > > 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:722)
> > >
> > >
> > >
> > > On Mon, May 20, 2013 at 9:15 AM, Howard W. Smith, Jr. <
> > > smithh032...@gmail.com> wrote:
> > >
> > > > There was a separate thread in PrimeFaces forum, where I was
> suggested
> > to
> > > > use @Typed instead of my user-defined @Descendant. :)
> > > >
> > > > I will try @Typed as you recommended and report back, ASAP. Thanks.
> > > >
> > > >
> > > >
> > > > On Mon, May 20, 2013 at 9:13 AM, John D. Ament <
> john.d.am...@gmail.com
> > > >wrote:
> > > >
> > > >> Howard,
> > > >>
> > > >> When were you recommended to use @Typed?
> > > >> @Typed (in that thread) was being used to *remove* objects from
> being
> > > >> installed via CDI.
> > > >> If you want to use @Typed you need to use it as @Typed(pf_
> > > >> OrderCustomerPointOfContactController.class)
> > > >>
> > > >>
> > > >> On Mon, May 20, 2013 at 9:08 AM, Howard W. Smith, Jr. <
> > > >> smithh032...@gmail.com> wrote:
> > > >>
> > > >> > Okay, I've seen the recent OWB (or CDI) topics, so I thought I
> might
> > > >> > introduce a separate thread based on my experience today.
> > > >> >
> > > >> > Months ago, I migrated from JSF managed beans to CDI manageds (and
> > > >> migrated
> > > >> > from Glassfish to TomEE/OpenWebBeans), two birds with one stone.
> > > During
> > > >> > that migration, I created the following for descendant managed
> beans
> > > in
> > > >> my
> > > >> > app.
> > > >> >
> > > >> > @Qualifier
> > > >> > @Retention(RUNTIME)
> > > >> > @Target({TYPE, METHOD, FIELD, PARAMETER})
> > > >> > public @interface Descendant {}
> > > >> >
> > > >> > which allowed me to implement the following ancestor class (for
> > > >> example):
> > > >> >
> > > >> > @Default
> > > >> > @Named("pf_addressController")
> > > >> > @SessionScoped
> > > >> > public class pf_AddressController implements Serializable {
> > > >> >
> > > >> > and develop descendants, which extend the ancestor as follows (for
> > > >> > example):
> > > >> >
> > > >> > @Descendant
> > > >> > @Named("pf_hotelAddressController")
> > > >> > @SessionScoped
> > > >> > public class pf_HotelAddressController extends
> pf_AddressController
> > {
> > > >> >
> > > >> > also, I was able to add the following to one of my
> > pf_OrdersController
> > > >> > (which has 'no' descendant classes)
> > > >> >
> > > >> >     @Inject @Descendant
> > > >> >     private pf_OrderCustomerPointOfContactController
> > > >> > orderCustomerPointOfContactController;
> > > >> >
> > > >> > Everything mentioned above has worked in production ever since I
> > > started
> > > >> > using TomEE (almost 6 months ago).
> > > >> >
> > > >> > Today, it was suggested that I use @Typed instead of this
> > user-defined
> > > >> > @Descendant. @Typed seems to work well on/for extending managed
> bean
> > > >> > ancestors, but I replaced @Descendant (in the code above) with
> > @Typed
> > > as
> > > >> > seen below (for bean 'member'):
> > > >> >
> > > >> >     @Inject @Descendant
> > > >> >     private pf_OrderCustomerPointOfContactController
> > > >> > orderCustomerPointOfContactController;
> > > >> >
> > > >> > and now, TomEE will not start, because of the following error:
> > > >> >
> > > >> >
> > > >> > INFO: Adding OpenWebBeansPlugin : [CdiPlugin]
> > > >> > May 20, 2013 8:42:34 AM org.apache.webbeans.plugins.PluginLoader
> > > startUp
> > > >> > INFO: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
> > > >> > May 20, 2013 8:42:36 AM org.apache.openejb.cdi.OpenEJBLifecycle
> > > >> > startApplication
> > > >> > SEVERE: CDI Beans module deployment failed
> > > >> > javax.enterprise.inject.UnsatisfiedResolutionException: Api type
> > > >> >
> > > >>
> > >
> >
> [jsf.orderCustomerPointOfContact.pf_OrderCustomerPointOfContactController]
> > > >> > is not found with the qualifiers
> > > >> > Qualifiers: [@javax.enterprise.inject.Default()]
> > > >> > for injection into Field Injection Point, field name :
> > > >> >  orderCustomerPointOfContactController, Bean Owner :
> > > >> [pf_OrdersController,
> > > >> > Name:pf_ordersController, WebBeans Type:MANAGED, API
> > > >> >
> > > >> >
> > > >>
> > >
> >
> Types:[java.io.Serializable,java.lang.Object,jsf.orders.pf_OrdersController],
> > > >> >
> > > >> >
> > > >>
> > >
> >
> Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.webbeans.util.InjectionExceptionUtil.throwUnsatisfiedResolutionException(InjectionExceptionUtil.java:77)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.webbeans.container.InjectionResolver.getInjectionPointBean(InjectionResolver.java:238)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.webbeans.util.WebBeansUtil.isPassivationCapableDependency(WebBeansUtil.java:1573)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.webbeans.config.DeploymentValidationService.validatePassivationCapableDependencies(DeploymentValidationService.java:170)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.webbeans.config.DeploymentValidationService.validatePassivationCapable(DeploymentValidationService.java:127)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.webbeans.config.BeansDeployer.checkPassivationScope(BeansDeployer.java:748)
> > > >> > at
> > > >> >
> > > >>
> > >
> org.apache.webbeans.config.BeansDeployer.validate(BeansDeployer.java:428)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.webbeans.config.BeansDeployer.validateInjectionPoints(BeansDeployer.java:390)
> > > >> > at
> > > >>
> > org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:194)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:182)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:158)
> > > >> > at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:43)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:793)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:608)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1111)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:974)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:124)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269)
> > > >> > at
> > > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> > > >> > at
> > > >> >
> > > >> >
> > > >>
> > >
> >
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
> > > >> > at
> > > >>
> > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
> > > >> > at
> > > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
> > > >> > at
> > > org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
> > > >> > at
> > > >> >
> > > >>
> > >
> >
> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1654)
> > > >> > at
> > > >>
> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> > > >> > at
> > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> > > >> > at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> > > >> > 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:722)
> > > >> >
> > > >>
> > > >
> > > >
> > >
> >
>

Reply via email to