Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] How can I exclude class's in aspectJ pointcuts

So the NPE is occurring at line 54 in your aspect? Without seeing the
code, it sounds like you need to either guard the line that is
suffering from a null or find the place that is getting matched which
leads to the null occurring in your advice.  you could do that with
something like this in your advice:

if (whateverItIs==null) System.err.println("Null after matching here:
"+thisJoinPoint.getSourceLocation());

Andy.

On 27/11/2007, Meir Yanovich <meiry@xxxxxxxxxxxx> wrote:
> Well yes from the what I see I have something like 600+ methods that I
> expected , and I don't see any ajcore file...
> Also this is java.lang.NullPointerException im getting ..
>
> -----Original Message-----
> From: aspectj-users-bounces@xxxxxxxxxxx
> [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Andy Clement
> Sent: Tuesday, November 27, 2007 4:38 PM
> To: aspectj-users@xxxxxxxxxxx
> Subject: Re: [aspectj-users] How can I exclude class's in aspectJ
> pointcuts
>
> what do you mean by stuck trace? is that the only line of output you
> see?  Did weaving all go OK?
> If AspectJ crashed during weaving you might see an ajcore file on the
> disk which would give details of the problem.  If you compile with
> -showWeaveInfo are you definetly seeing that it advices only where you
> expect?
>
> Andy
>
> On 27/11/2007, Meir Yanovich <meiry@xxxxxxxxxxxx> wrote:
> > No just one time , not recursion . this is stuck trace
> >
> > -----Original Message-----
> > From: aspectj-users-bounces@xxxxxxxxxxx
> > [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Andy Clement
> > Sent: Tuesday, November 27, 2007 3:44 PM
> > To: aspectj-users@xxxxxxxxxxx
> > Subject: Re: [aspectj-users] How can I exclude class's in aspectJ
> > pointcuts
> >
> > that looks just like one line of a Java stack trace?  Are you getting
> > that over and over?  If so that could indicate you have advised
> > yourself by accident and are recursing...
> >
> > Andy.
> >
> > On 27/11/2007, Meir Yanovich <meiry@xxxxxxxxxxxx> wrote:
> > > Hello and thanks for the fast reply I added this.
> > > But I still getting error ..
> > > My real case is bit more complex then the example I gave.
> > > How can I get some kind of error checking from aspectJ or somekind
> of
> > > debug info from aspectJ ?
> > > All im getting is :
> > > at
> > >
> >
> com.foo.configuration.AspectSecurity.ajc$before$com_foo_configuration_As
> > > pectSecurity$1$dbea9d15(AspectSecurity.aj:54)
> > >
> > > in line 54 I have called method from within my application .
> > >
> > > -----Original Message-----
> > > From: aspectj-users-bounces@xxxxxxxxxxx
> > > [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of
> > > hermod.opstvedt@xxxxxxxxx
> > > Sent: Tuesday, November 27, 2007 2:37 PM
> > > To: aspectj-users@xxxxxxxxxxx
> > > Subject: RE: [aspectj-users] How can I exclude class's in aspectJ
> > > pointcuts
> > >
> > > Hi
> > >
> > > ...... && !within(com.fo.test.security.*)
> > >
> > > Hermod
> > >
> > > -----Original Message-----
> > > From: aspectj-users-bounces@xxxxxxxxxxx
> > > [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Meir
> Yanovich
> > > Sent: Tuesday, November 27, 2007 1:25 PM
> > > To: aspectj-users@xxxxxxxxxxx
> > > Subject: [aspectj-users] How can I exclude class's in aspectJ
> > pointcuts
> > >
> > >
> > > Hello all
> > > I like to advice all the class's under :
> > > com.foo.test.* but NOT the classes under com.fo.test.security.* How
> > can
> > > I represent that with aspectJ pointcuts ?
> > > _______________________________________________
> > > aspectj-users mailing list
> > > aspectj-users@xxxxxxxxxxx
> > > https://dev.eclipse.org/mailman/listinfo/aspectj-users
> > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> *
> > *
> > > * *
> > >
> > > This email with attachments is solely for the use of the individual
> or
> > > entity to whom it is addressed. Please also be aware that the DnB
> NOR
> > > Group
> > > cannot accept any payment orders or other legally binding
> > correspondence
> > > with
> > > customers as a part of an email.
> > >
> > > This email message has been virus checked by the anti virus programs
> > > used
> > > in the DnB NOR Group.
> > >
> > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> *
> > *
> > > * *
> > > _______________________________________________
> > > aspectj-users mailing list
> > > aspectj-users@xxxxxxxxxxx
> > > https://dev.eclipse.org/mailman/listinfo/aspectj-users
> > >
> > > _______________________________________________
> > > aspectj-users mailing list
> > > aspectj-users@xxxxxxxxxxx
> > > https://dev.eclipse.org/mailman/listinfo/aspectj-users
> > >
> > _______________________________________________
> > aspectj-users mailing list
> > aspectj-users@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
> > _______________________________________________
> > aspectj-users mailing list
> > aspectj-users@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
> >
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top