[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [aspectj-users] problem weaving cflow pointcut aspects intojarfile
|
That
worked !! Thanks for your help !!
Regards
-manish
I think its the
problem that the cflowcounter needs to be added to the aspect but you are
passing it in on the aspectpath rather than the inpath. Can you try it
on the inpath instead?
Andy.
On 12/12/05, Sharan,
Manish <Manish.Sharan@xxxxxxx>
wrote:
Hi Andy
I have only one
aspect . This aspect has 'before' and 'after retuning' and 'after
throwing' advices.
Here is something else I
found : if I weave the Aspect source along with the target source
files ( that is not use the pre-compiled jar file but instead use the
source of the jar file), then everything works
fine.
So this issue seems to only
happen when the aspect is being weaved into a pre-compiled jar file.
Regards
-manish
It might be a known issue. Do you use
the tracePoints() pointcuts in multiple different aspects?
I fixed
something possibly related to this earlier on
today...
Andy.
On 12/12/05, Sharan, Manish <Manish.Sharan@xxxxxxx> wrote:
Hi
all
(I am currently using AspectJ 1.5.0 M5, Released 16th November,
2005 with JDK 1.4.2_06-b03)
I am using iajc to weave
tracing aspects that uses cflow pointcuts into previously compiled
source files that are in a jar file. If my tracing aspects do not
contain the cflow poincuts, everything works fine. If they
contain cflow pontcuts , I get this error when executing the jar file:
Exception in thread "main" java.lang.NoSuchFieldError:
ajc$cflowCounter$0
This is the ant task script I am using to
weave the aspects: (the ant task executes without any
problems)
<target name="inject">
<mkdir
dir="dest"/>
<iajc
outjar="dest/rulesparser-traceable.jar">
<inpath>
<pathelement
location="target/rulesparser-
1.0-SNAPSHOT.jar"/>
</inpath>
<aspectpath>
<pathelement
location="tracing.jar"/>
</aspectpath>
<classpath>
<pathelement
location="${aspectj.dir}/lib/aspectjrt.jar"/>
</classpath>
</iajc>
</target>
//
--this the pointcut which causes the above exception
protected
pointcut tracePoints() :
(
!cflow(execution(String
*.toString()))
&&
!cflowbelow(within(JoinPointTraceAspect))
&&
!execution(* *.hashCode())
&&
!execution(*
*.checkTransaction())
&&
(execution(* *.*
(..)))
);
/* This
aspect does not cause the above error but is not enough as it
does not use cflow pointcuts
protected
pointcut tracePoints()
:
!execution(String
*.toString())
&&
!within(JoinPointTraceAspect)
&&
!execution(*
*.hashCode())
&&
!execution(* *.checkTransaction())
&&
execution(* *.* (..));
*/
Could anyone tell me what I
could do to fix it ? Is this a known issue
?
Regards
-manish
_______________________________________________
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