You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Ivan Junckes Filho <iv...@gmail.com> on 2019/03/12 19:34:21 UTC
RestClient issue - different apps with same client
Hey guys, there is a very annoying bug when using rest client from cxf
3.2.7 in TomEE M2. When 2 apps have the same client the server throws the
error below and shuts down?
Shouldn't we allow different apps in the same server use the same client?
*Error*
Caused by: org.apache.webbeans.exception.WebBeansException:
org.apache.webbeans.exception.DuplicateDefinitionException:
PassivationCapable bean id is not unique:
br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient
bean:SiemClassificacaoServiceClient, WebBeansType:THIRDPARTY,
Name:br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient,
API
Types:[br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient],
Qualifiers:[javax.enterprise.inject.Default,org.eclipse.microprofile.rest.client.inject.RestClient,javax.enterprise.inject.Any],
existing: SiemClassificacaoServiceClient, WebBeansType:THIRDPARTY,
Name:br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient,
API
Types:[br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient],
Qualifiers:[javax.enterprise.inject.Default,org.eclipse.microprofile.rest.client.inject.RestClient,javax.enterprise.inject.Any]
at
org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:371)
at
org.apache.webbeans.event.NotificationManager.invokeObserverMethod(NotificationManager.java:818)
at
org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:714)
... 42 more
Re: RestClient issue - different apps with same client
Posted by Ivan Junckes Filho <iv...@gmail.com>.
Thanks Romain, I will see if I can fix this.
On Tue, Mar 12, 2019 at 6:01 PM j4fm <ja...@my-managed.net> wrote:
> https://issues.apache.org/jira/browse/CXF-7980
>
>
>
>
> --
> Sent from:
> http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
>
Re: RestClient issue - different apps with same client
Posted by Ivan Junckes Filho <iv...@gmail.com>.
Thanks Romain, I will see if I can fix this.
On Tue, Mar 12, 2019 at 6:01 PM j4fm <ja...@my-managed.net> wrote:
> https://issues.apache.org/jira/browse/CXF-7980
>
>
>
>
> --
> Sent from:
> http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
>
Re: RestClient issue - different apps with same client
Posted by j4fm <ja...@my-managed.net>.
https://issues.apache.org/jira/browse/CXF-7980
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
Re: RestClient issue - different apps with same client
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Cxf rest cdi extension leaks beans, think i opened n issue last week or the
week before about it. Dropping the static from the extension fixes that.
Guess it was done as a workaround for ears but probably better to use
another mecanism like the one of deltaspike or just not do it.
Le mar. 12 mars 2019 à 20:46, Daniel Cunha <da...@apache.org> a écrit :
> Hi Ivan,
>
> Can you share a sample?
>
> Em ter, 12 de mar de 2019 às 16:34, Ivan Junckes Filho <
> ivanjunckes@gmail.com> escreveu:
>
> > Hey guys, there is a very annoying bug when using rest client from cxf
> > 3.2.7 in TomEE M2. When 2 apps have the same client the server throws the
> > error below and shuts down?
> >
> > Shouldn't we allow different apps in the same server use the same client?
> >
> > *Error*
> > Caused by: org.apache.webbeans.exception.WebBeansException:
> > org.apache.webbeans.exception.DuplicateDefinitionException:
> > PassivationCapable bean id is not unique:
> > br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient
> > bean:SiemClassificacaoServiceClient, WebBeansType:THIRDPARTY,
> >
> >
> Name:br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient,
> > API
> >
> >
> Types:[br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient],
> >
> >
> Qualifiers:[javax.enterprise.inject.Default,org.eclipse.microprofile.rest.client.inject.RestClient,javax.enterprise.inject.Any],
> > existing: SiemClassificacaoServiceClient, WebBeansType:THIRDPARTY,
> >
> >
> Name:br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient,
> > API
> >
> >
> Types:[br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient],
> >
> >
> Qualifiers:[javax.enterprise.inject.Default,org.eclipse.microprofile.rest.client.inject.RestClient,javax.enterprise.inject.Any]
> > at
> >
> >
> org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:371)
> > at
> >
> >
> org.apache.webbeans.event.NotificationManager.invokeObserverMethod(NotificationManager.java:818)
> > at
> >
> >
> org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:714)
> > ... 42 more
> >
>
>
> --
> Daniel "soro" Cunha
> https://twitter.com/dvlc_
>
Re: RestClient issue - different apps with same client
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Cxf rest cdi extension leaks beans, think i opened n issue last week or the
week before about it. Dropping the static from the extension fixes that.
Guess it was done as a workaround for ears but probably better to use
another mecanism like the one of deltaspike or just not do it.
Le mar. 12 mars 2019 à 20:46, Daniel Cunha <da...@apache.org> a écrit :
> Hi Ivan,
>
> Can you share a sample?
>
> Em ter, 12 de mar de 2019 às 16:34, Ivan Junckes Filho <
> ivanjunckes@gmail.com> escreveu:
>
> > Hey guys, there is a very annoying bug when using rest client from cxf
> > 3.2.7 in TomEE M2. When 2 apps have the same client the server throws the
> > error below and shuts down?
> >
> > Shouldn't we allow different apps in the same server use the same client?
> >
> > *Error*
> > Caused by: org.apache.webbeans.exception.WebBeansException:
> > org.apache.webbeans.exception.DuplicateDefinitionException:
> > PassivationCapable bean id is not unique:
> > br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient
> > bean:SiemClassificacaoServiceClient, WebBeansType:THIRDPARTY,
> >
> >
> Name:br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient,
> > API
> >
> >
> Types:[br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient],
> >
> >
> Qualifiers:[javax.enterprise.inject.Default,org.eclipse.microprofile.rest.client.inject.RestClient,javax.enterprise.inject.Any],
> > existing: SiemClassificacaoServiceClient, WebBeansType:THIRDPARTY,
> >
> >
> Name:br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient,
> > API
> >
> >
> Types:[br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient],
> >
> >
> Qualifiers:[javax.enterprise.inject.Default,org.eclipse.microprofile.rest.client.inject.RestClient,javax.enterprise.inject.Any]
> > at
> >
> >
> org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:371)
> > at
> >
> >
> org.apache.webbeans.event.NotificationManager.invokeObserverMethod(NotificationManager.java:818)
> > at
> >
> >
> org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:714)
> > ... 42 more
> >
>
>
> --
> Daniel "soro" Cunha
> https://twitter.com/dvlc_
>
Re: RestClient issue - different apps with same client
Posted by Daniel Cunha <da...@apache.org>.
Hi Ivan,
Can you share a sample?
Em ter, 12 de mar de 2019 às 16:34, Ivan Junckes Filho <
ivanjunckes@gmail.com> escreveu:
> Hey guys, there is a very annoying bug when using rest client from cxf
> 3.2.7 in TomEE M2. When 2 apps have the same client the server throws the
> error below and shuts down?
>
> Shouldn't we allow different apps in the same server use the same client?
>
> *Error*
> Caused by: org.apache.webbeans.exception.WebBeansException:
> org.apache.webbeans.exception.DuplicateDefinitionException:
> PassivationCapable bean id is not unique:
> br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient
> bean:SiemClassificacaoServiceClient, WebBeansType:THIRDPARTY,
>
> Name:br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient,
> API
>
> Types:[br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient],
>
> Qualifiers:[javax.enterprise.inject.Default,org.eclipse.microprofile.rest.client.inject.RestClient,javax.enterprise.inject.Any],
> existing: SiemClassificacaoServiceClient, WebBeansType:THIRDPARTY,
>
> Name:br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient,
> API
>
> Types:[br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient],
>
> Qualifiers:[javax.enterprise.inject.Default,org.eclipse.microprofile.rest.client.inject.RestClient,javax.enterprise.inject.Any]
> at
>
> org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:371)
> at
>
> org.apache.webbeans.event.NotificationManager.invokeObserverMethod(NotificationManager.java:818)
> at
>
> org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:714)
> ... 42 more
>
--
Daniel "soro" Cunha
https://twitter.com/dvlc_
Re: RestClient issue - different apps with same client
Posted by Daniel Cunha <da...@apache.org>.
Hi Ivan,
Can you share a sample?
Em ter, 12 de mar de 2019 às 16:34, Ivan Junckes Filho <
ivanjunckes@gmail.com> escreveu:
> Hey guys, there is a very annoying bug when using rest client from cxf
> 3.2.7 in TomEE M2. When 2 apps have the same client the server throws the
> error below and shuts down?
>
> Shouldn't we allow different apps in the same server use the same client?
>
> *Error*
> Caused by: org.apache.webbeans.exception.WebBeansException:
> org.apache.webbeans.exception.DuplicateDefinitionException:
> PassivationCapable bean id is not unique:
> br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient
> bean:SiemClassificacaoServiceClient, WebBeansType:THIRDPARTY,
>
> Name:br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient,
> API
>
> Types:[br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient],
>
> Qualifiers:[javax.enterprise.inject.Default,org.eclipse.microprofile.rest.client.inject.RestClient,javax.enterprise.inject.Any],
> existing: SiemClassificacaoServiceClient, WebBeansType:THIRDPARTY,
>
> Name:br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient,
> API
>
> Types:[br.com.gbrsistemas.crvirtual.classificacao.SiemClassificacaoServiceClient],
>
> Qualifiers:[javax.enterprise.inject.Default,org.eclipse.microprofile.rest.client.inject.RestClient,javax.enterprise.inject.Any]
> at
>
> org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:371)
> at
>
> org.apache.webbeans.event.NotificationManager.invokeObserverMethod(NotificationManager.java:818)
> at
>
> org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:714)
> ... 42 more
>
--
Daniel "soro" Cunha
https://twitter.com/dvlc_