maybe bean-discovery=annotated problem?

Am Do., 21. Feb. 2019 um 09:28 Uhr schrieb Romain Manni-Bucau <
rmannibu...@gmail.com>:

> Hi Frank,
>
> TomEE does nothing about it so wonder if it is due to the CDI API
> dependency you use which is likely different and one could lack @Inherited.
>
> As a reference I don't see this issue happening with this sample - and
> dependencies:
>
> import groovy.transform.CompileStatic
>
> @Grab('org.apache.geronimo.specs:geronimo-annotation_1.3_spec:1.1')
> @Grab('org.apache.geronimo.specs:geronimo-jcdi_2.0_spec:1.1')
> @Grab('org.apache.geronimo.specs:geronimo-atinject_1.0_spec:1.0')
> @Grab('org.apache.tomcat:tomcat-el-api:9.0.16')
> @Grab('org.apache.openwebbeans:openwebbeans-se:2.0.6')
> import javax.enterprise.context.RequestScoped
> import javax.enterprise.inject.se.SeContainerInitializer
>
> @CompileStatic
> @RequestScoped
> class Base {
> }
>
> @CompileStatic
> class Child extends Base {
> }
>
> def instance =
> SeContainerInitializer.newInstance().disableDiscovery().addBeanClasses(Base.class,
> Child.class).initialize()
> println
> instance.beanManager.resolve(instance.beanManager.getBeans(Child.class)).scope
> // prints RequestScoped
> instance.close()
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> <
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >
>
>
> Le jeu. 21 févr. 2019 à 09:14, Frank Jung <kamin.feuer.2...@gmx.de> a
> écrit :
>
> > Hi,
> >
> >
> >
> > it seems that there is an issue with inheriting Scope-Annotations using
> > OPenWebBeans in an JavaSE environment:
> >
> >
> >
> > If I annotate the bean directly with @RequestScoped all is ok. If I move
> > the
> > annotation to a base class I get an exception. This only happens in an
> > JavaSE environment. The same scenario with TomEE 8 PluME works.
> >
> >
> >
> > Before creating a ticket in JIRA I want to ask here if I am doing
> something
> > wrong .
> >
> >
> >
> > I used this dependencies in my pom.xml: openwebbeans-se,
> openwebbeans-spi,
> > openwebbeans-impl (Version 2.0.8)
> >
> >
> >
> > This is the exception I get:
> >
> > Exception in thread "main"
> > org.apache.webbeans.exception.WebBeansDeploymentException:
> > javax.enterprise.inject.UnsatisfiedResolutionException: Api type
> > [de.frandly.labor.bootcdidemo.app.RequestBean] is not found with the
> > qualifiers
> >
> >   Qualifiers: [@javax.enterprise.inject.Default()]
> >
> >   for injection into Field Injection Point, field name :  requestBean,
> Bean
> > Owner : [AppMain, WebBeansType:MANAGED, Name:null, API
> > Types:[de.frandly.labor.bootcdidemo.app.AppMain,java.lang.Object],
> > Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
> >
> >     ...
> >
> >   Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Api
> > type [de.frandly.labor.bootcdidemo.app.RequestBean] is not found with the
> > qualifiers
> >
> >   Qualifiers: [@javax.enterprise.inject.Default()]
> >
> >   for injection into Field Injection Point, field name :  requestBean,
> Bean
> > Owner : [AppMain, WebBeansType:MANAGED, Name:null, API
> > Types:[de.frandly.labor.bootcdidemo.app.AppMain,java.lang.Object],
> > Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
> >
> >     ...
> >
> >   Command execution failed.
> >
> >   org.apache.commons.exec.ExecuteException: Process exited with an
> error: 1
> > (Exit value: 1)
> >
> >     ...
> >
> >
> >
> > Thank you
> >
> >
> >
> > Frankie
> >
> >
> >
> >
>

Reply via email to