You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@rave.apache.org by Matt Franklin <m....@gmail.com> on 2014/03/18 19:23:35 UTC

Re: Intercept Opensocial REST call with AspectJ

That service only exists in the opensocial provider and therefore only runs
within shindig.  If you are trying to create a join point from within the
Rave war that class doesn't exist.


On Mon, Feb 24, 2014 at 6:36 AM, Sergio Rivero <
srivero@galileasoluciones.com> wrote:

> Hi all!
>
>
>
> I'm working with Apache Rave archetype (v 0.23) and I need use AspectJ to
> intercept a REST call (osapi.activities.create) in the server side and
> change the "viewerID".
>
>
>
> First of all, I'm trying to intercept the Java method that create the
> ActivityStream and print a message, I think that the method is
>
> "org.apache.rave.opensocial.service.impl.DefaultActivityStreamsService.creat
> e(..)". I use this Aspect:
>
>
>
>        @Before("execution(*
>
> org.apache.rave.opensocial.service.impl.DefaultActivityStreamsService.create
> (..))")
>
>        public void doBefore(JoinPoint joinPoint) {
>
>              System.out.println("I'm an Aspect!");
>
>        }
>
>
>
>
>
> But I get an exception when I run Apache Rave:
>
>
>
> Initialization of bean failed; nested exception is
> java.lang.IllegalArgumentException: warning no match for this type name:
> org.apache.rave.opensocial.service.impl.DefaultActivityStreamsService
> [Xlint: invalidAbsoluteTypeName]
>
>
>
> Somebody has tried to do something this?
>
>
>
> Best regards,
>
>
>
>
>
> Sergio
>
>
>
>

Re: Intercept Opensocial REST call with AspectJ

Posted by Matt Franklin <m....@gmail.com>.
On Wed, Mar 19, 2014 at 1:31 PM, Sergio Rivero <
srivero@galileasoluciones.com> wrote:

> Thanks Matt,
>
> Any suggestion about this?
>

If you are trying to intercept that service call, make sure those AOP
configurations are only in the opensocial provider and not in the rave war.


>
> Best regards,
>
> Sergio
>
> -----Mensaje original-----
> De: Matt Franklin [mailto:m.ben.franklin@gmail.com]
> Enviado el: martes, 18 de marzo de 2014 19:24
> Para: users@rave.apache.org
> Asunto: Re: Intercept Opensocial REST call with AspectJ
>
> That service only exists in the opensocial provider and therefore only runs
> within shindig.  If you are trying to create a join point from within the
> Rave war that class doesn't exist.
>
>
> On Mon, Feb 24, 2014 at 6:36 AM, Sergio Rivero <
> srivero@galileasoluciones.com> wrote:
>
> > Hi all!
> >
> >
> >
> > I'm working with Apache Rave archetype (v 0.23) and I need use AspectJ
> > to intercept a REST call (osapi.activities.create) in the server side
> > and change the "viewerID".
> >
> >
> >
> > First of all, I'm trying to intercept the Java method that create the
> > ActivityStream and print a message, I think that the method is
> >
> > "org.apache.rave.opensocial.service.impl.DefaultActivityStreamsService
> > .creat
> > e(..)". I use this Aspect:
> >
> >
> >
> >        @Before("execution(*
> >
> > org.apache.rave.opensocial.service.impl.DefaultActivityStreamsService.
> > create
> > (..))")
> >
> >        public void doBefore(JoinPoint joinPoint) {
> >
> >              System.out.println("I'm an Aspect!");
> >
> >        }
> >
> >
> >
> >
> >
> > But I get an exception when I run Apache Rave:
> >
> >
> >
> > Initialization of bean failed; nested exception is
> > java.lang.IllegalArgumentException: warning no match for this type name:
> > org.apache.rave.opensocial.service.impl.DefaultActivityStreamsService
> > [Xlint: invalidAbsoluteTypeName]
> >
> >
> >
> > Somebody has tried to do something this?
> >
> >
> >
> > Best regards,
> >
> >
> >
> >
> >
> > Sergio
> >
> >
> >
> >
>
>

RE: Intercept Opensocial REST call with AspectJ

Posted by Sergio Rivero <sr...@galileasoluciones.com>.
Thanks Matt,

Any suggestion about this?

Best regards,

Sergio

-----Mensaje original-----
De: Matt Franklin [mailto:m.ben.franklin@gmail.com] 
Enviado el: martes, 18 de marzo de 2014 19:24
Para: users@rave.apache.org
Asunto: Re: Intercept Opensocial REST call with AspectJ

That service only exists in the opensocial provider and therefore only runs
within shindig.  If you are trying to create a join point from within the
Rave war that class doesn't exist.


On Mon, Feb 24, 2014 at 6:36 AM, Sergio Rivero <
srivero@galileasoluciones.com> wrote:

> Hi all!
>
>
>
> I'm working with Apache Rave archetype (v 0.23) and I need use AspectJ 
> to intercept a REST call (osapi.activities.create) in the server side 
> and change the "viewerID".
>
>
>
> First of all, I'm trying to intercept the Java method that create the 
> ActivityStream and print a message, I think that the method is
>
> "org.apache.rave.opensocial.service.impl.DefaultActivityStreamsService
> .creat
> e(..)". I use this Aspect:
>
>
>
>        @Before("execution(*
>
> org.apache.rave.opensocial.service.impl.DefaultActivityStreamsService.
> create
> (..))")
>
>        public void doBefore(JoinPoint joinPoint) {
>
>              System.out.println("I'm an Aspect!");
>
>        }
>
>
>
>
>
> But I get an exception when I run Apache Rave:
>
>
>
> Initialization of bean failed; nested exception is
> java.lang.IllegalArgumentException: warning no match for this type name:
> org.apache.rave.opensocial.service.impl.DefaultActivityStreamsService
> [Xlint: invalidAbsoluteTypeName]
>
>
>
> Somebody has tried to do something this?
>
>
>
> Best regards,
>
>
>
>
>
> Sergio
>
>
>
>