Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Running AspectJ

FYI, Narinder corresponded with me off list and this turned out to be the
solution:

To use the weaving URL class loader in this way, you need to run without
April_Rel.jar on the system classpath: it has to NOT be loaded from the
system loader. I have written a nondelegating subclass of
WeavingURLClassLoader (I submitted it as an enhancement in bugzilla) that
removes the need for -Daj.class.path


-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Narinder Goyal ,
HCL-Industry Solutions
Sent: Monday, April 16, 2007 10:20 PM
To: aspectj-users@xxxxxxxxxxx
Subject: RE: [aspectj-users] Running AspectJ


Hi All,

As I am trying to do LTW .. my batch file look like below...

set AspectJ_LIB=D:\aspect\lib

java -classpath %AspectJ_LIB%\aspectjweaver.jar;
C:\java\j2sdk1.4.2\lib;D:\tracker_code\jars\April_Rel.jar;-Daj.class.pat
h=D:\tracker_code\jars\aspect2.jar;D:\tracker_code\jars\ April_Rel.jar
-Daj.aspect.path=D:\tracker_code\jars\aspect2.jar -ms8m -mx128m -mx500m
-Djava.system.class.loader=org.aspectj.weaver.loadtime.WeavingURLClassLo
ader  tracker.gui.screentemplate.CScrLogin 

I am trying to weave my aspects2.jar with my main jar April_Rel.jar. The
batch file is running successfully but nothing is getting printed.

Please let me know if I need to check/do something else also for my LTW
to work.

Thanks in advance and let me know if something is not clear.
  
Thanks & Regards,
Narinder Goyal

-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Stalsy
Sent: Tuesday, April 10, 2007 2:59 PM
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] Running AspectJ

Hi,

have a look at 
http://www.eclipse.org/aspectj/doc/released/devguide/ltw.html.

best regards



Narinder Goyal , HCL-Industry Solutions ha scritto:
> Hi All,
>
> I am also very new to the AspectJ.... 
> I actually require doing the Load time weaving instead of compile time
> weaving as suggested below.... I have created my aspects (.aj files)
in
> separate project as my Java project is quite big and when I try to do
> the compile time weaving, it gives me the overflow error ...
>
> Please let me know how can I weave both the projects during run time?
>
> Thanks in advance ... Please let me know if some other info is
> required... 
>
> Thanks & Regards,
> Narinder Goyal
>
> -----Original Message-----
> From: aspectj-users-bounces@xxxxxxxxxxx
> [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of rolando80
> Sent: Tuesday, April 03, 2007 7:03 PM
> To: aspectj-users@xxxxxxxxxxx
> Subject: Re: [aspectj-users] Running AspectJ
>
>
> thank you, now it works
>
> roland
>
>
> Andy Clement wrote:
>   
>> ensure you have aspectjrt.jar on your classpath whenever working with
>> AspectJ:
>>
>> set CLASSPATH=%CLASSPATH%;c:\aspectj\lib\aspectjrt.jar
>>
>> then it will be available for the compilation step and the execution
>>     
> step.
>   
>> ajc *.java *.aj
>> java Test2
>>
>> Andy.
>>
>> On 03/04/07, rolando80 <roland_piazzi@xxxxxxxxxxx> wrote:
>>     
>>> Hi!
>>>
>>> When i compile all files and run now me gives an error like:
>>>
>>> "Exception in Thread main: NoClassDefFoundError:
>>> org/aspectj/lang/Signature"
>>>
>>> and when i add the classpath :
>>>
>>> java -classpath %classpath%aspectjrt.jar Test2 then writes:
>>>
>>> "NoClassDefFoundError: Test2"
>>>
>>> Excuse me because of the simple question.
>>>
>>> Roland
>>>
>>>
>>>
>>>
>>> Andy Clement wrote:
>>>       
>>>> Given that your aspect is in a file called 'LogCollector.aj' - are
>>>>         
> you
>   
>>>> sure you are including it in the compile? You must do:
>>>>
>>>> ajc *.aj *.java
>>>>
>>>> If you just do
>>>>
>>>> ajc *.java
>>>>
>>>> then the aspect won't be picked up.  I compiled your 3 files and it
>>>> worked as you expect, with the method executions advised.
>>>>
>>>> Andy.
>>>>
>>>> On 03/04/07, rolando80 <roland_piazzi@xxxxxxxxxxx> wrote:
>>>>         
>>>>> Hi!
>>>>>
>>>>> yes in Eclipse the program runs normally, but out of this not.
>>>>>
>>>>> Roland
>>>>>
>>>>>
>>>>> Jesse Hepburn wrote:
>>>>>           
>>>>>> Or you can get the AspectJ plugin for eclipse.  Then all you
>>>>>>             
> need to
>   
>>> do
>>>       
>>>>> is
>>>>>           
>>>>>> mark the project as an aspectJ project and you're set.
>>>>>>
>>>>>> It even tells you what match points you have.
>>>>>>
>>>>>> ----- Original Message ----
>>>>>> From: Andy Clement <andrew.clement@xxxxxxxxx>
>>>>>> To: aspectj-users@xxxxxxxxxxx
>>>>>> Sent: Monday, April 2, 2007 1:04:57 PM
>>>>>> Subject: Re: [aspectj-users] Running AspectJ
>>>>>>
>>>>>> Hi Roland,
>>>>>>
>>>>>> What are you expecting it to do?  Have you written some
>>>>>>             
> pointcuts
>   
>>> and
>>>       
>>>>>> advice in an aspect that you expect should apply when you run
>>>>>>             
> the
>   
>>> Test
>>>       
>>>>>> program?  You can tell if weaving is occurring from the command
>>>>>>             
> line
>   
>>>>>> using 'ajc -showWeaveInfo *.java' - does that produce any extra
>>>>>> output?  Are your aspects in a .java file or in a .aj file?
>>>>>>
>>>>>> Andy.
>>>>>>
>>>>>> On 02/04/07, Roland Piazzi <roland_piazzi@xxxxxxxxxxx> wrote:
>>>>>>             
>>>>>>> Hi!
>>>>>>>
>>>>>>> I'm very new with aspectJ and I'm trying to run a program with
>>>>>>>
>>>>>>> ajc -classpath %aspectj_home% *.java
>>>>>>>
>>>>>>> and
>>>>>>>
>>>>>>> java Test
>>>>>>>
>>>>>>> it runs without errors, but within the output it forgets to put
>>>>>>>               
> the
>   
>>>>>>> aspect-output.
>>>>>>>
>>>>>>> The program does function with eclipse.
>>>>>>>
>>>>>>> I've not modified inpath and aspectpath, should i do so?
>>>>>>>
>>>>>>> Excuse me because of the very easy question...
>>>>>>>
>>>>>>> I would be very thankful if someone could help me.
>>>>>>>
>>>>>>> roland
>>>>>>> _______________________________________________
>>>>>>> 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
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>             
>
________________________________________________________________________
> ____________
>   
>>>>>> Never miss an email again!
>>>>>> Yahoo! Toolbar alerts you the instant new Mail arrives.
>>>>>> http://tools.search.yahoo.com/toolbar/features/mail/
>>>>>> _______________________________________________
>>>>>> aspectj-users mailing list
>>>>>> aspectj-users@xxxxxxxxxxx
>>>>>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>>>>>
>>>>>>
>>>>>>             
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Running-AspectJ-tf3507798.html#a9807655
>>>>> Sent from the AspectJ - users mailing list archive at Nabble.com.
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>
>>>>
>>>>         
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Running-AspectJ-tf3507798.html#a9809430
>>> Sent from the AspectJ - users mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> 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
>>
>>
>>     
>
>   


-- 
Stalsy

  HomePage   --:. http://www.stalsy.it
  Blog       --:. http://blog.stalsy.com
  Public Key --:. http://www.stalsy.it/key.php
  E-Mail     --:. stalsy@xxxxxxxxx  
  MSN        --:. faricci@xxxxxxxx
  Skype      --:. www.stalsy.it



_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users

DISCLAIMER:
----------------------------------------------------------------------------
-------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only. 
It shall not attach any liability on the originator or HCL or its
affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect
the opinions of HCL or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail
is strictly prohibited. If you have 
received this email in error please delete it and notify the sender
immediately. Before opening any mail and 
attachments please check them for viruses and defect.

----------------------------------------------------------------------------
-------------------------------------------
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top