Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] A strange problem while LTW.

Unfortunately I'm not familiar with an eclipselink setup.  What we
could do is turn on more diagnostics so we can tell if the weaver is
actually getting to see your classes.  That extra info will come out
if you use -verbose and -debug - both of which are discussed here:
http://andrewclement.blogspot.com/2009/02/load-time-weaving-basics.html

Andy

On 16 August 2010 22:50, Shashikant Kale
<Shashikant.Kale@xxxxxxxxxxxxxxxx> wrote:
> Hi Andy,
>
> Thanks for the reply. I use aspect 1.6.3 version.
>
> I checked the log generated by setting 'showWeaveInfo' to true. However I don't find any warning that a type is not exposed to the weaver.
>
> The aop.xml contents are pasted below
>
> <aspectj>
>    <weaver options="-showWeaveInfo">
>        <include within="com.arisglobal..*" />
>        <include within="com.ags..*" />
>    </weaver>
>    <aspects>
>        <aspect name="com.arisglobal.aglite.aop.EntityAuditAspect" />
>    </aspects>
> </aspectj>
>
> I want the classes present in the com.arisglobal..* and com.ags..* to be weaved. Also the parent and the children classes I was talking about are in the same package.
>
> Also I am using eclipselink and spring with
>        <properties>
>            <property name="eclipselink.weaving.fetchgroups" value="false"/>
>            <property name="eclipselink.weaving.changetracking" value="false"/>
>            <property name="eclipselink.weaving.internal" value="false"/>
>        </properties>
> in the persistence.xml. In the spring configuration I have enabled LTW by providing <context:load-time-weaver/>.
>
> Please let me know if I am going wrong somewhere.
>
> Thanks,
> Shashi
>
>
>
> -----Original Message-----
> From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Andy Clement
> Sent: Tuesday, August 17, 2010 2:30 AM
> To: aspectj-users@xxxxxxxxxxx
> Subject: Re: [aspectj-users] A strange problem while LTW.
>
> Hi,
>
> Do you get a warning when LTW that a type is not exposed to the
> weaver? (the top most one)  Given the description that it is behaving
> when being built as an eclipse project, that suggests the aop.xml
> configuring the LTW has a problem.
>
> What version of AspectJ LTW are you using?  If you are on 1.6.7 then
> you may have issues if you are using certain include/exclude clauses
> in the aop.xml.  I would recommend moving off it onto 1.6.8 or 1.6.9.
>
> If you give me more details on the aop.xml, maybe we can work out whats up.
>
> cheers,
> Andy
>
> On 16 August 2010 04:29, Shashikant Kale
> <Shashikant.Kale@xxxxxxxxxxxxxxxx> wrote:
>> Hi,
>>
>>
>>
>> I have been using aspects for some time in our application. I had few unit
>> test cases for a cross cutting functionality of auditing data changes on JPA
>> entities. This was done using LTW. However now when I try to run the unit
>> test case within eclipse, I am facing a strange issue of top level entity
>> not getting weaved. However the entities which are child level are getting
>> weaved. I found this by enabling showWeaveInfo flag in the aop.xml.
>>
>>
>>
>> When I try to switch to AspectJ development perspective in eclipse, it shows
>> that the methods of the parent entity also are weaved. However in the LTW
>> doesn't really weave the code.
>>
>>
>>
>> I am not sure what the reason could be for this strange behavior. Could
>> somebody please throw some light?
>>
>>
>>
>> Regards,
>> Shashi
>>
>> _______________________________________________
>> 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