Uwe,

I don't believe this is a CLASSPATH problem but perhaps a weaving problem. 
The application would seem to run fine in Eclipse (using something like an 
Eclipse Application launch configuration I presume) but not when exported. 
Could you try a single i.e. default rather than pertypewithin aspect to 
see if your RCP application works. How is your application packaged, is 
the aspect in the same bundle as the failing class? Could you open an AJDT 
bug and if possible attach the .class file for LoggingAspect and the 
failing class?

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM United Kingdom Limited
Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)



<[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED]
14/03/2007 15:18
Please respond to
[email protected]


To
<[email protected]>
cc

Subject
AW: AW: [aspectj-users] AspectJ will not run in anEclipseRCP application 
[NVG-MSW51-SPAM-Content]






Hi Matthew,

sure, here is the stacktrace of the NoAspectBoundexception

org.aspectj.lang.NoAspectBoundException
 de.nvg.desktop.core.aspect.LoggingAspect.aspectOf(LoggingAspect.aj:1)
 
de.nvg.desktop.management.BlueprintManagerImpl.addType(BlueprintManagerImpl.java:96)
 
de.nvg.desktop.management.BlueprintManagerImpl.add(BlueprintManagerImpl.java:50)
 
de.nvg.desktop.blueprint.BlueprintFactory.loadAllBlueprints(BlueprintFactory.java:95)
 
de.nvg.desktop.ApplicationWorkbenchAdvisor.initialize(ApplicationWorkbenchAdvisor.java:115)
 
org.eclipse.ui.application.WorkbenchAdvisor.internalBasicInitialize(WorkbenchAdvisor.java:172)
 org.eclipse.ui.internal.Workbench.init(Workbench.java:1069)
 org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1847)
 
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
 org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
                 de.nvg.desktop.Application.run(Application.java:40)
 
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
 
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
 
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
 
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
 
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
                 sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
                 sun.reflect.NativeMethodAccessorImpl.invoke(Unknown 
Source)
                 sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown 
Source)
                 java.lang.reflect.Method.invoke(Unknown Source)
 org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
                 org.eclipse.core.launcher.Main.basicRun(Main.java:280)
                 org.eclipse.core.launcher.Main.run(Main.java:977)
                 org.eclipse.core.launcher.Main.main(Main.java:952)

The class BlueprintmanagerImpl has a class annotation @Logging, which is 
representing in LoggingAspect.

Thanks for helping
UWE 

-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] Im Auftrag von Matthew Webster
Gesendet: Dienstag, 13. März 2007 18:29
An: [email protected]
Betreff: Re: AW: [aspectj-users] AspectJ will not run in anEclipseRCP 
application [NVG-MSW51-SPAM-Content]


Uwe, 

If the org.aspectj.runtime bundle was missing then it's more likely you 
would be getting a NoClassDefFoundError for NoAspectBoundException (which 
every aspect needs). It's more likely that another dependency is missing. 
Can you post the actual exception/error you are getting along with a stack 
trace? 

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM United Kingdom Limited
Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal) 



<[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED] 

13/03/2007 09:18 
Please respond to
[email protected]

To
<[email protected]> 
cc
Subject
AW: [aspectj-users] AspectJ will not run in an EclipseRCP application 
[NVG-MSW51-SPAM-Content]

 




Thank you for the tip, but both of your offers are set.

MANIFEST.MF
...
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.aspectj.runtime, 
...

product configuration
...
org.aspectj.runtime
...

yet another ideas, thanks

Uwe
-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] Im Auftrag von Matt Chapman
Gesendet: Montag, 12. März 2007 17:52
An: [email protected]
Betreff: Re: [aspectj-users] AspectJ will not run in an EclipseRCP 
application [NVG-MSW51-SPAM-Content]

Firstly, your plugins with aspects need to depend on the
"org.aspectj.runtime" plugin. This needs to be specified in your
MANIFEST.MF file (or plugin.xml). Secondly, check that the
"org.aspectj.runtime" plugin is present in your exported eclipse
product.

Regards,

Matt.

On 12/03/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi all,
>
> I'm new in working with AspectJ. I just take it for logging over java
> annotation (@Logging). My problem is, the aspects would not run in the 
RCP
> Application, when the libraries are eclipse plugins. Here I become a
> NoAspectBoudException. First Time I just look, about the classpath, but 
the
> runtime archive from AspectJ is available. Next I have set a environment
> variable ASPECTJRT_LIB (equivalent eclipse), no success. And at the end, 
I
> have seen, that the aspect in plugin archives would not run, but in core
> java archives, they will still do their job. The phenomen is, in the 
eclipse
> IDE with AJDT, when I run the RCP application (over product 
configuration),
> all the aspects will be run fine and all loooking good, but when I build 
a
> RCP Application over EXPORT/Eclipse product with AspectJ support and 
start
> the application, I become a NoAspectBoundException.
>
> Here a Code Snippet:
>
> public aspect LoggingAspect pertypewithin(@Logging *)
> {
>   ...
>   static aspect Worker
>   {
>     pointcut createLoggingOwner():staticinitialization(@Logging *);
>
>     after():createLoggingOwner()
>     {
>       Signature signature =  thisJoinPoint.getSignature();
>       Class clazz = signature.getDeclaringType();
>       LoggingAspect object = LoggingAspect.aspectOf(clazz);
>
>       // read Annotation
>       Logging at =
> (Logging)clazz.getAnnotation(Logging.class);
>     }
>   }
> }
>
> The pointcut will not run, only in plugin jars.
>
>
> Has anything ideas, thanks.
> Uwe
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

NÜRNBERGER Beteiligungs-Aktiengesellschaft - Aufsichtsrat: Hans-Peter 
Schmidt (Vorsitzender)
Vorstand: Dr. Werner Rupp (Vorsitzender), Dr. Armin Zitzmann (stellv. 
Vorsitzender), Walter Bockshecker,
Henning von der Forst, Dr. Wolf-Rüdiger Knocke, Dr. Hans-Joachim Rauscher
Sitz und Registergericht Nürnberg HR B 66

NÜRNBERGER Lebensversicherung AG - Aufsichtsrat: Hans-Peter Schmidt 
(Vorsitzender)
Vorstand: Dr. Werner Rupp (Sprecher), Walter Bockshecker, Henning von der 
Forst,
Dr. Wolf-Rüdiger Knocke, Dr. Hans-Joachim Rauscher, Dr. Armin Zitzmann
Sitz und Registergericht Nürnberg HR B 9342

NÜRNBERGER Allgemeine Versicherungs-AG - Aufsichtsrat: Hans-Peter Schmidt 
(Vorsitzender)
Vorstand: Dr. Armin Zitzmann (Sprecher), Walter Bockshecker, Henning von 
der Forst, Dr. Wolf-Rüdiger Knocke,
Dr. Hans-Joachim Rauscher, Dr. Werner Rupp
Sitz und Registergericht Nürnberg HR B 774

GARANTA Versicherungs-AG - Aufsichtsrat: Hans-Peter Schmidt (Vorsitzender)
Vorstand: Walter Bockshecker, Henning von der Forst, Dr. Wolf-Rüdiger 
Knocke, Peter Meier,
Dr. Hans-Joachim Rauscher, Dr. Werner Rupp, Dr. Armin Zitzmann
Sitz und Registergericht Nürnberg HR B 6063

Ust-Id-Nr. DE 13 35 00 778

Bei Rechtsstreitigkeiten in Versicherungsfragen ist die Gesellschaft 
maßgeblich, die auf dem Versicherungsschein als Vertragspartner angegeben 
ist.

Angaben zu weiteren Konzerngesellschaften der NÜRNBERGER finden Sie unter 
http://konzerngesellschaften.nuernberger.de

Hinweis:
Der Inhalt dieser E-Mail ist ausschließlich für den bezeichneten Empfänger 
bestimmt und kann vertrauliche Informationen enthalten. Wenn Sie nicht der 
Empfänger dieser E-Mail oder dessen Vertreter sind, dann senden Sie bitte 
die E-Mail an den Absender zurück (Antwort-Funktion). Entfernen Sie bitte 
danach die Nachricht aus Ihrem System.
MSW 5.1

_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users





________________________________





Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU 








_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users







Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU





_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to