Re: [weld-dev] WELD-001417 while enabling interceptors in JBoss Forge addons

2017-07-25 Thread George Gastaldi
Ah yes, turns out that I can't enable interceptors if the JARs are not read
by Weld, which I can't do because of classloading isolation.

I tried to explicitly add the interceptors but failed to do so, therefore I
closed the issue and introduced another Furnace implementation - still in
Alpha stage [1] which runs on a single Weld instance and works as expected.

[1] https://github.com/gastaldi/furnace-embedded

Best Regards,

George Gastaldi



Em 25 de jul de 2017 05:42, "Martin Kouba" <mko...@redhat.com> escreveu:

Ok, so when looking at FURNACE-145 and FURNACE-32 the problem seems to be
related to how Forge addons are isolated, right?

Martin

Dne 18.7.2017 v 17:48 George Gastaldi napsal(a):

> Yes, please find attached a ZIP containing two addons.
>
> To reproduce it, follow the steps:
>
> 1) Unzip the attached file (say in /tmp)
> 2) Start Forge
> 3) Run addon-build-and-install --project-root /tmp/infinispan
> 4) Run addon-build-and-install --project-root /tmp/foo
> 5) Stop Forge and start it again
> 6) In another bash window, run tail -f ~/.forge/log/forge.log  and you
> should see the Weld output.
> 7) If no errors are found, running the command "x" should print something
>
> @Matej, same error using @Priority :(
>
> I am still investigating
>
> Best Regards,
>
>
>
> George Gastaldi
>
> Principal Software Engineer
>
> Red Hat <https://www.redhat.com>
>
>
> Remote
>
> Joinville - Santa Catarina
>
> ggast...@redhat.com <mailto:ggast...@redhat.com> M: +55-47-99711-1000
> <tel:+55-47-99711-1000>
>
> <https://red.ht/sig>
> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted>
>
> @redhatnews <https://twitter.com/redhatnews> Red Hat <
> https://www.linkedin.com/company/red-hat> Red Hat <
> https://www.facebook.com/RedHatInc>
>
>
>
> On Tue, Jul 18, 2017 at 10:12 AM, Antoine Sabot-Durand <a...@redhat.com
> <mailto:a...@redhat.com>> wrote:
>
> Hi George,
>
> Can you send us some code that we can easily run to reproduce your
> issue ?
>
> Thx
>
> Antoine
>
> On Tue, Jul 18, 2017 at 9:50 AM Matej Novotny <manov...@redhat.com
> <mailto:manov...@redhat.com>> wrote:
>
> Hi George
>
> Forge addons are far from my range of expertise so I am just
> going to shoot in the dark here :)
>
> Make sure you have beans.xml (with discovery mode all and
> enabled interceptor) in both JARS - the one which contains the
> interceptor, as well as the one trying to use it.
>
> If that doesn't work, try to tackle the interceptor a bit and
> use @Priority as a means of enablement (this enables interceptor
> globally as opposed to beans.xml which does that on
> per-bean-archive basis).
> Might not be what you seek but might also give us some
> additional information on whats going wrong.
>
>         Matej
>
>     ----- Original Message -
>      > From: "George Gastaldi" <ggast...@redhat.com
> <mailto:ggast...@redhat.com>>
>  > To: "Weld" <weld-dev@lists.jboss.org
> <mailto:weld-dev@lists.jboss.org>>
>  > Sent: Tuesday, July 18, 2017 1:37:15 AM
>  > Subject: [weld-dev] WELD-001417 while enabling interceptors
> in JBoss Forgeaddons
>  >
>  > Hello Welders !
>  >
>  > Not sure if this is the right mailing list, but worth a shot ;)
>  >
>  > I am trying to enable a CDI interceptor inside JBoss Forge
> addons but I am
>  > facing a hard time making Weld understand that. The
> interceptor classes are
>  > in the classpath but I keep getting this error:
>  >
>  > WELD-001417: Enabled interceptor class
>  > org.jboss.forge.addon.infinispan.MyInterceptor
>  > (org.jboss.forge.addon.infinispan.MyInterceptor
> in
>  >
> jar:file:/home/ggastald/.forge/addons/org-foo-foo-1-0-0-
> SNAPSHOT/foo-1.0.0-SNAPSHOT-forge-addon.jar!/META-INF/beans.xml@7)
>  > does not match an interceptor bean: the class is not found,
> or not annotated
>  > with @Interceptor and still not registered through a portable
> extension, or
>  > not annotated with @Dependent inside an implicit bean archive
>  >
>  > I have beans.xml with annotated-mode="all".

Re: [weld-dev] WELD-001417 while enabling interceptors in JBoss Forge addons

2017-07-25 Thread Martin Kouba
Ok, so when looking at FURNACE-145 and FURNACE-32 the problem seems to 
be related to how Forge addons are isolated, right?

Martin

Dne 18.7.2017 v 17:48 George Gastaldi napsal(a):
> Yes, please find attached a ZIP containing two addons.
> 
> To reproduce it, follow the steps:
> 
> 1) Unzip the attached file (say in /tmp)
> 2) Start Forge
> 3) Run addon-build-and-install --project-root /tmp/infinispan
> 4) Run addon-build-and-install --project-root /tmp/foo
> 5) Stop Forge and start it again
> 6) In another bash window, run tail -f ~/.forge/log/forge.log  and you 
> should see the Weld output.
> 7) If no errors are found, running the command "x" should print something
> 
> @Matej, same error using @Priority :(
> 
> I am still investigating
> 
> Best Regards,
> 
> 
> 
> George Gastaldi
> 
> Principal Software Engineer
> 
> Red Hat <https://www.redhat.com>
> 
> Remote
> 
> Joinville - Santa Catarina
> 
> ggast...@redhat.com <mailto:ggast...@redhat.com> M: +55-47-99711-1000 
> <tel:+55-47-99711-1000>
> 
> <https://red.ht/sig>  
> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted>
> 
> @redhatnews <https://twitter.com/redhatnews> Red Hat 
> <https://www.linkedin.com/company/red-hat> Red Hat 
> <https://www.facebook.com/RedHatInc>
> 
> 
> On Tue, Jul 18, 2017 at 10:12 AM, Antoine Sabot-Durand <a...@redhat.com 
> <mailto:a...@redhat.com>> wrote:
> 
> Hi George,
> 
> Can you send us some code that we can easily run to reproduce your
> issue ?
> 
> Thx
> 
> Antoine
> 
> On Tue, Jul 18, 2017 at 9:50 AM Matej Novotny <manov...@redhat.com
> <mailto:manov...@redhat.com>> wrote:
> 
> Hi George
> 
> Forge addons are far from my range of expertise so I am just
> going to shoot in the dark here :)
> 
> Make sure you have beans.xml (with discovery mode all and
> enabled interceptor) in both JARS - the one which contains the
> interceptor, as well as the one trying to use it.
> 
> If that doesn't work, try to tackle the interceptor a bit and
> use @Priority as a means of enablement (this enables interceptor
> globally as opposed to beans.xml which does that on
> per-bean-archive basis).
> Might not be what you seek but might also give us some
> additional information on whats going wrong.
> 
> Matej
> 
>         ----- Original Message -----
>  > From: "George Gastaldi" <ggast...@redhat.com
> <mailto:ggast...@redhat.com>>
>  > To: "Weld" <weld-dev@lists.jboss.org
> <mailto:weld-dev@lists.jboss.org>>
>  > Sent: Tuesday, July 18, 2017 1:37:15 AM
>  > Subject: [weld-dev] WELD-001417 while enabling interceptors
> in JBoss Forgeaddons
>  >
>  > Hello Welders !
>  >
>  > Not sure if this is the right mailing list, but worth a shot ;)
>  >
>  > I am trying to enable a CDI interceptor inside JBoss Forge
> addons but I am
>  > facing a hard time making Weld understand that. The
> interceptor classes are
>  > in the classpath but I keep getting this error:
>  >
>  > WELD-001417: Enabled interceptor class
>  > org.jboss.forge.addon.infinispan.MyInterceptor
>  > (org.jboss.forge.addon.infinispan.MyInterceptor in
>  >
> 
> jar:file:/home/ggastald/.forge/addons/org-foo-foo-1-0-0-SNAPSHOT/foo-1.0.0-SNAPSHOT-forge-addon.jar!/META-INF/beans.xml@7)
>  > does not match an interceptor bean: the class is not found,
> or not annotated
>  > with @Interceptor and still not registered through a portable
> extension, or
>  > not annotated with @Dependent inside an implicit bean archive
>  >
>  > I have beans.xml with annotated-mode="all". I even added the
> @Dependent to
>  > the interceptor class, but no luck. The current thread
> ClassLoader can
>  > resolve the interceptor class also.
>  >
>  > I've opened https://issues.jboss.org/browse/FURNACE-145
> <https://issues.jboss.org/browse/FURNACE-145> with more information
>  > on the subject, in case someone feels brave enough to help me
> out on this
>  > :).
>  >
>   

Re: [weld-dev] WELD-001417 while enabling interceptors in JBoss Forge addons

2017-07-18 Thread Antoine Sabot-Durand
Hi George,

Can you send us some code that we can easily run to reproduce your issue ?

Thx

Antoine

On Tue, Jul 18, 2017 at 9:50 AM Matej Novotny <manov...@redhat.com> wrote:

> Hi George
>
> Forge addons are far from my range of expertise so I am just going to
> shoot in the dark here :)
>
> Make sure you have beans.xml (with discovery mode all and enabled
> interceptor) in both JARS - the one which contains the interceptor, as well
> as the one trying to use it.
>
> If that doesn't work, try to tackle the interceptor a bit and use
> @Priority as a means of enablement (this enables interceptor globally as
> opposed to beans.xml which does that on per-bean-archive basis).
> Might not be what you seek but might also give us some additional
> information on whats going wrong.
>
> Matej
>
> - Original Message -
> > From: "George Gastaldi" <ggast...@redhat.com>
> > To: "Weld" <weld-dev@lists.jboss.org>
> > Sent: Tuesday, July 18, 2017 1:37:15 AM
> > Subject: [weld-dev] WELD-001417 while enabling interceptors in JBoss
> Forgeaddons
> >
> > Hello Welders !
> >
> > Not sure if this is the right mailing list, but worth a shot ;)
> >
> > I am trying to enable a CDI interceptor inside JBoss Forge addons but I
> am
> > facing a hard time making Weld understand that. The interceptor classes
> are
> > in the classpath but I keep getting this error:
> >
> > WELD-001417: Enabled interceptor class
> > org.jboss.forge.addon.infinispan.MyInterceptor
> > (org.jboss.forge.addon.infinispan.MyInterceptor in
> >
> jar:file:/home/ggastald/.forge/addons/org-foo-foo-1-0-0-SNAPSHOT/foo-1.0.0-SNAPSHOT-forge-addon.jar!/META-INF/beans.xml@7
> )
> > does not match an interceptor bean: the class is not found, or not
> annotated
> > with @Interceptor and still not registered through a portable extension,
> or
> > not annotated with @Dependent inside an implicit bean archive
> >
> > I have beans.xml with annotated-mode="all". I even added the @Dependent
> to
> > the interceptor class, but no luck. The current thread ClassLoader can
> > resolve the interceptor class also.
> >
> > I've opened https://issues.jboss.org/browse/FURNACE-145 with more
> information
> > on the subject, in case someone feels brave enough to help me out on this
> > :).
> >
> > I appreciate any help!
> >
> > Best Regards,
> >
> >
> >
> >
> >
> >
> >
> >
> > George Gastaldi
> >
> > Principal Software Engineer
> >
> > Red Hat
> >
> > Remote
> >
> > Joinville - Santa Catarina
> >
> > ggast...@redhat.com M: +55-47-99711-1000 <+55%2047%2099711-1000>
> > TRIED. TESTED. TRUSTED.
> > @redhatnews Red Hat Red Hat
> >
> >
> > ___
> > weld-dev mailing list
> > weld-dev@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/weld-dev
> ___
> weld-dev mailing list
> weld-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev
>
___
weld-dev mailing list
weld-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-dev

Re: [weld-dev] WELD-001417 while enabling interceptors in JBoss Forge addons

2017-07-18 Thread Matej Novotny
Hi George

Forge addons are far from my range of expertise so I am just going to shoot in 
the dark here :)

Make sure you have beans.xml (with discovery mode all and enabled interceptor) 
in both JARS - the one which contains the interceptor, as well as the one 
trying to use it.

If that doesn't work, try to tackle the interceptor a bit and use @Priority as 
a means of enablement (this enables interceptor globally as opposed to 
beans.xml which does that on per-bean-archive basis).
Might not be what you seek but might also give us some additional information 
on whats going wrong.

Matej

- Original Message -
> From: "George Gastaldi" <ggast...@redhat.com>
> To: "Weld" <weld-dev@lists.jboss.org>
> Sent: Tuesday, July 18, 2017 1:37:15 AM
> Subject: [weld-dev] WELD-001417 while enabling interceptors in JBoss Forge
> addons
> 
> Hello Welders !
> 
> Not sure if this is the right mailing list, but worth a shot ;)
> 
> I am trying to enable a CDI interceptor inside JBoss Forge addons but I am
> facing a hard time making Weld understand that. The interceptor classes are
> in the classpath but I keep getting this error:
> 
> WELD-001417: Enabled interceptor class
> org.jboss.forge.addon.infinispan.MyInterceptor
> (org.jboss.forge.addon.infinispan.MyInterceptor in
> jar:file:/home/ggastald/.forge/addons/org-foo-foo-1-0-0-SNAPSHOT/foo-1.0.0-SNAPSHOT-forge-addon.jar!/META-INF/beans.xml@7)
> does not match an interceptor bean: the class is not found, or not annotated
> with @Interceptor and still not registered through a portable extension, or
> not annotated with @Dependent inside an implicit bean archive
> 
> I have beans.xml with annotated-mode="all". I even added the @Dependent to
> the interceptor class, but no luck. The current thread ClassLoader can
> resolve the interceptor class also.
> 
> I've opened https://issues.jboss.org/browse/FURNACE-145 with more information
> on the subject, in case someone feels brave enough to help me out on this
> :).
> 
> I appreciate any help!
> 
> Best Regards,
> 
> 
> 
> 
> 
> 
> 
> 
> George Gastaldi
> 
> Principal Software Engineer
> 
> Red Hat
> 
> Remote
> 
> Joinville - Santa Catarina
> 
> ggast...@redhat.com M: +55-47-99711-1000
> TRIED. TESTED. TRUSTED.
> @redhatnews Red Hat Red Hat
> 
> 
> ___
> weld-dev mailing list
> weld-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev
___
weld-dev mailing list
weld-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-dev