You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@deltaspike.apache.org by Esteve Avilés <ea...@gmail.com> on 2015/12/08 14:14:14 UTC

WARNING on BeanProvider shall not be used to create ...

Hi,

I am using Data module Repository features and I get this Warning every
time the repository is injected:

14:04:41,444 WARNING [provider.BeanProvider] BeanProvider shall not be used
to create @Dependent scoped beans. Bean: Custom Bean with bean class class
cat.tmb.tdo.ocicommerce.domain.model.venda.OperacioServeiVendaRepository
and qualifiers [@javax.enterprise.inject.Default(),
@javax.enterprise.inject.Any()]
My code looks like:

@Stateless

public class OrdreVendaBO extends BaseBO<OrdreVenda> {

@Inject private OrdreVendaRepository ordreVendaRepository;

....


And the repository:


@Repository

public abstract class OrdreVendaRepository extends
BaseRepository<OrdreVenda> {

@Inject

private ModePagamentBO modePagamentBO;

@Query(named = "OrdreVendaRepository.retrieveWithAssociationsById")

public abstract OrdreVenda retrieveWithAssociationsById(@QueryParam(
"ordreVendaId") Long id,
...


Could anyone help on this issue?

Thanks in advance.
Regards,

Esteve
-- 
Esteve Avilés

Re: WARNING on BeanProvider shall not be used to create ...

Posted by Thomas Andraschko <an...@gmail.com>.
AFAIR 1.3 or 1.4.

2015-12-08 18:25 GMT+01:00 John D. Ament <jo...@apache.org>:

> On Tue, Dec 8, 2015 at 10:55 AM Thomas Andraschko <
> andraschko.thomas@gmail.com> wrote:
>
> > Which version do you use?
> >
>
> Which version allowed us to start specifying scope on an interface for
> partial bean?
>
>
> > Please use the newest, otherwise provide a issue to replicate the
> > AbstractMethodError. This should not occur.
> >
> > 2015-12-08 16:24 GMT+01:00 Esteve Avilés <ea...@gmail.com>:
> >
> > > Yes,
> > >
> > > This is an exception when added @ApplicationScoped annotation to the
> > > repository.
> > >
> > > Data module is included.
> > >
> > > Every thing works fine (without @ApplicationScoped ) but the WARNING
> > > message appears every time it is called.
> > >
> > > Thanks
> > >
> > > On Tue, Dec 8, 2015 at 3:54 PM, Thomas Andraschko <
> > > andraschko.thomas@gmail.com> wrote:
> > >
> > > > hmm? thats a completely other error as in the first mail.
> > > > Make sure you have the data-impl module included.
> > > >
> > > >
> > > > 2015-12-08 15:40 GMT+01:00 Esteve Avilés <ea...@gmail.com>:
> > > >
> > > > > Hi Thomas,
> > > > >
> > > > > I have the repository declared as:
> > > > >
> > > > > @Repository
> > > > >
> > > > > public abstract class ServeiVendaRepository extends
> > > > > BaseRepository<ServeiVenda> {
> > > > >
> > > > >
> > > > > And BaseRespository:
> > > > >
> > > > > public abstract class BaseRepository<ENTITY> implements
> > > > > CriteriaSupport<ENTITY>, EntityRepository<ENTITY, Long>,
> > > > > EntityManagerDelegate<ENTITY> {
> > > > >
> > > > > ....
> > > > >
> > > > >
> > > > > Then I get this error:
> > > > >
> > > > >
> > > > > Caused by: java.lang.AbstractMethodError:
> > > > >
> > > > >
> > > >
> > >
> >
> cat.tmb.tdo.ocicommerce.domain.bo.BaseRepository.save(Ljava/lang/Object;)Ljava/lang/Object;
> > > > >
> > > > > at cat.tmb.tdo.ocicommerce.domain.bo.BaseBO.save(BaseBO.java:192)
> > > > > [domain-1.14.0-snapshot.jar:]
> > > > >
> > > > > at cat.tmb.tdo.ocicommerce.domain.bo.venda.ServeiVendaBO.save(
> > > > > ServeiVendaBO.java:381) [domain-1.14.0-snapshot.jar:]
> > > > >
> > > > >
> > > > > Thanks:
> > > > >
> > > > > On Tue, Dec 8, 2015 at 3:09 PM, Thomas Andraschko <
> > > > > andraschko.thomas@gmail.com> wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > setting a scope (e.g. ApplicationScope) on your repositories
> should
> > > fix
> > > > > the
> > > > > > warning.
> > > > > > Repositories are normally stateless, so using ApplicationScoped
> > > should
> > > > be
> > > > > > fine.
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Esteve Avilés
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Esteve Avilés
> > >
> >
>

Re: WARNING on BeanProvider shall not be used to create ...

Posted by "John D. Ament" <jo...@apache.org>.
On Tue, Dec 8, 2015 at 10:55 AM Thomas Andraschko <
andraschko.thomas@gmail.com> wrote:

> Which version do you use?
>

Which version allowed us to start specifying scope on an interface for
partial bean?


> Please use the newest, otherwise provide a issue to replicate the
> AbstractMethodError. This should not occur.
>
> 2015-12-08 16:24 GMT+01:00 Esteve Avilés <ea...@gmail.com>:
>
> > Yes,
> >
> > This is an exception when added @ApplicationScoped annotation to the
> > repository.
> >
> > Data module is included.
> >
> > Every thing works fine (without @ApplicationScoped ) but the WARNING
> > message appears every time it is called.
> >
> > Thanks
> >
> > On Tue, Dec 8, 2015 at 3:54 PM, Thomas Andraschko <
> > andraschko.thomas@gmail.com> wrote:
> >
> > > hmm? thats a completely other error as in the first mail.
> > > Make sure you have the data-impl module included.
> > >
> > >
> > > 2015-12-08 15:40 GMT+01:00 Esteve Avilés <ea...@gmail.com>:
> > >
> > > > Hi Thomas,
> > > >
> > > > I have the repository declared as:
> > > >
> > > > @Repository
> > > >
> > > > public abstract class ServeiVendaRepository extends
> > > > BaseRepository<ServeiVenda> {
> > > >
> > > >
> > > > And BaseRespository:
> > > >
> > > > public abstract class BaseRepository<ENTITY> implements
> > > > CriteriaSupport<ENTITY>, EntityRepository<ENTITY, Long>,
> > > > EntityManagerDelegate<ENTITY> {
> > > >
> > > > ....
> > > >
> > > >
> > > > Then I get this error:
> > > >
> > > >
> > > > Caused by: java.lang.AbstractMethodError:
> > > >
> > > >
> > >
> >
> cat.tmb.tdo.ocicommerce.domain.bo.BaseRepository.save(Ljava/lang/Object;)Ljava/lang/Object;
> > > >
> > > > at cat.tmb.tdo.ocicommerce.domain.bo.BaseBO.save(BaseBO.java:192)
> > > > [domain-1.14.0-snapshot.jar:]
> > > >
> > > > at cat.tmb.tdo.ocicommerce.domain.bo.venda.ServeiVendaBO.save(
> > > > ServeiVendaBO.java:381) [domain-1.14.0-snapshot.jar:]
> > > >
> > > >
> > > > Thanks:
> > > >
> > > > On Tue, Dec 8, 2015 at 3:09 PM, Thomas Andraschko <
> > > > andraschko.thomas@gmail.com> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > setting a scope (e.g. ApplicationScope) on your repositories should
> > fix
> > > > the
> > > > > warning.
> > > > > Repositories are normally stateless, so using ApplicationScoped
> > should
> > > be
> > > > > fine.
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Esteve Avilés
> > > >
> > >
> >
> >
> >
> > --
> > Esteve Avilés
> >
>

Re: WARNING on BeanProvider shall not be used to create ...

Posted by Thomas Andraschko <an...@gmail.com>.
Which version do you use?
Please use the newest, otherwise provide a issue to replicate the
AbstractMethodError. This should not occur.

2015-12-08 16:24 GMT+01:00 Esteve Avilés <ea...@gmail.com>:

> Yes,
>
> This is an exception when added @ApplicationScoped annotation to the
> repository.
>
> Data module is included.
>
> Every thing works fine (without @ApplicationScoped ) but the WARNING
> message appears every time it is called.
>
> Thanks
>
> On Tue, Dec 8, 2015 at 3:54 PM, Thomas Andraschko <
> andraschko.thomas@gmail.com> wrote:
>
> > hmm? thats a completely other error as in the first mail.
> > Make sure you have the data-impl module included.
> >
> >
> > 2015-12-08 15:40 GMT+01:00 Esteve Avilés <ea...@gmail.com>:
> >
> > > Hi Thomas,
> > >
> > > I have the repository declared as:
> > >
> > > @Repository
> > >
> > > public abstract class ServeiVendaRepository extends
> > > BaseRepository<ServeiVenda> {
> > >
> > >
> > > And BaseRespository:
> > >
> > > public abstract class BaseRepository<ENTITY> implements
> > > CriteriaSupport<ENTITY>, EntityRepository<ENTITY, Long>,
> > > EntityManagerDelegate<ENTITY> {
> > >
> > > ....
> > >
> > >
> > > Then I get this error:
> > >
> > >
> > > Caused by: java.lang.AbstractMethodError:
> > >
> > >
> >
> cat.tmb.tdo.ocicommerce.domain.bo.BaseRepository.save(Ljava/lang/Object;)Ljava/lang/Object;
> > >
> > > at cat.tmb.tdo.ocicommerce.domain.bo.BaseBO.save(BaseBO.java:192)
> > > [domain-1.14.0-snapshot.jar:]
> > >
> > > at cat.tmb.tdo.ocicommerce.domain.bo.venda.ServeiVendaBO.save(
> > > ServeiVendaBO.java:381) [domain-1.14.0-snapshot.jar:]
> > >
> > >
> > > Thanks:
> > >
> > > On Tue, Dec 8, 2015 at 3:09 PM, Thomas Andraschko <
> > > andraschko.thomas@gmail.com> wrote:
> > >
> > > > Hi,
> > > >
> > > > setting a scope (e.g. ApplicationScope) on your repositories should
> fix
> > > the
> > > > warning.
> > > > Repositories are normally stateless, so using ApplicationScoped
> should
> > be
> > > > fine.
> > > >
> > >
> > >
> > >
> > > --
> > > Esteve Avilés
> > >
> >
>
>
>
> --
> Esteve Avilés
>

Re: WARNING on BeanProvider shall not be used to create ...

Posted by Esteve Avilés <ea...@gmail.com>.
Yes,

This is an exception when added @ApplicationScoped annotation to the
repository.

Data module is included.

Every thing works fine (without @ApplicationScoped ) but the WARNING
message appears every time it is called.

Thanks

On Tue, Dec 8, 2015 at 3:54 PM, Thomas Andraschko <
andraschko.thomas@gmail.com> wrote:

> hmm? thats a completely other error as in the first mail.
> Make sure you have the data-impl module included.
>
>
> 2015-12-08 15:40 GMT+01:00 Esteve Avilés <ea...@gmail.com>:
>
> > Hi Thomas,
> >
> > I have the repository declared as:
> >
> > @Repository
> >
> > public abstract class ServeiVendaRepository extends
> > BaseRepository<ServeiVenda> {
> >
> >
> > And BaseRespository:
> >
> > public abstract class BaseRepository<ENTITY> implements
> > CriteriaSupport<ENTITY>, EntityRepository<ENTITY, Long>,
> > EntityManagerDelegate<ENTITY> {
> >
> > ....
> >
> >
> > Then I get this error:
> >
> >
> > Caused by: java.lang.AbstractMethodError:
> >
> >
> cat.tmb.tdo.ocicommerce.domain.bo.BaseRepository.save(Ljava/lang/Object;)Ljava/lang/Object;
> >
> > at cat.tmb.tdo.ocicommerce.domain.bo.BaseBO.save(BaseBO.java:192)
> > [domain-1.14.0-snapshot.jar:]
> >
> > at cat.tmb.tdo.ocicommerce.domain.bo.venda.ServeiVendaBO.save(
> > ServeiVendaBO.java:381) [domain-1.14.0-snapshot.jar:]
> >
> >
> > Thanks:
> >
> > On Tue, Dec 8, 2015 at 3:09 PM, Thomas Andraschko <
> > andraschko.thomas@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > setting a scope (e.g. ApplicationScope) on your repositories should fix
> > the
> > > warning.
> > > Repositories are normally stateless, so using ApplicationScoped should
> be
> > > fine.
> > >
> >
> >
> >
> > --
> > Esteve Avilés
> >
>



-- 
Esteve Avilés

Re: WARNING on BeanProvider shall not be used to create ...

Posted by Thomas Andraschko <an...@gmail.com>.
hmm? thats a completely other error as in the first mail.
Make sure you have the data-impl module included.


2015-12-08 15:40 GMT+01:00 Esteve Avilés <ea...@gmail.com>:

> Hi Thomas,
>
> I have the repository declared as:
>
> @Repository
>
> public abstract class ServeiVendaRepository extends
> BaseRepository<ServeiVenda> {
>
>
> And BaseRespository:
>
> public abstract class BaseRepository<ENTITY> implements
> CriteriaSupport<ENTITY>, EntityRepository<ENTITY, Long>,
> EntityManagerDelegate<ENTITY> {
>
> ....
>
>
> Then I get this error:
>
>
> Caused by: java.lang.AbstractMethodError:
>
> cat.tmb.tdo.ocicommerce.domain.bo.BaseRepository.save(Ljava/lang/Object;)Ljava/lang/Object;
>
> at cat.tmb.tdo.ocicommerce.domain.bo.BaseBO.save(BaseBO.java:192)
> [domain-1.14.0-snapshot.jar:]
>
> at cat.tmb.tdo.ocicommerce.domain.bo.venda.ServeiVendaBO.save(
> ServeiVendaBO.java:381) [domain-1.14.0-snapshot.jar:]
>
>
> Thanks:
>
> On Tue, Dec 8, 2015 at 3:09 PM, Thomas Andraschko <
> andraschko.thomas@gmail.com> wrote:
>
> > Hi,
> >
> > setting a scope (e.g. ApplicationScope) on your repositories should fix
> the
> > warning.
> > Repositories are normally stateless, so using ApplicationScoped should be
> > fine.
> >
>
>
>
> --
> Esteve Avilés
>

Re: WARNING on BeanProvider shall not be used to create ...

Posted by Esteve Avilés <ea...@gmail.com>.
Hi Thomas,

I have the repository declared as:

@Repository

public abstract class ServeiVendaRepository extends
BaseRepository<ServeiVenda> {


And BaseRespository:

public abstract class BaseRepository<ENTITY> implements
CriteriaSupport<ENTITY>, EntityRepository<ENTITY, Long>,
EntityManagerDelegate<ENTITY> {

....


Then I get this error:


Caused by: java.lang.AbstractMethodError:
cat.tmb.tdo.ocicommerce.domain.bo.BaseRepository.save(Ljava/lang/Object;)Ljava/lang/Object;

at cat.tmb.tdo.ocicommerce.domain.bo.BaseBO.save(BaseBO.java:192)
[domain-1.14.0-snapshot.jar:]

at cat.tmb.tdo.ocicommerce.domain.bo.venda.ServeiVendaBO.save(
ServeiVendaBO.java:381) [domain-1.14.0-snapshot.jar:]


Thanks:

On Tue, Dec 8, 2015 at 3:09 PM, Thomas Andraschko <
andraschko.thomas@gmail.com> wrote:

> Hi,
>
> setting a scope (e.g. ApplicationScope) on your repositories should fix the
> warning.
> Repositories are normally stateless, so using ApplicationScoped should be
> fine.
>



-- 
Esteve Avilés

Re: WARNING on BeanProvider shall not be used to create ...

Posted by Thomas Andraschko <an...@gmail.com>.
Hi,

setting a scope (e.g. ApplicationScope) on your repositories should fix the
warning.
Repositories are normally stateless, so using ApplicationScoped should be
fine.