Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » using AJ in eclipse plugins
using AJ in eclipse plugins [message #34975] Wed, 21 April 2004 14:12 Go to next message
Eclipse UserFriend
Originally posted by: edoardoATenigmatecDOTnet.no.spam

I am developing eclipse plugin projects, targeted to Eclipse 2.1, using
Eclipse 3.0 (M8).
I wanted to use some simple aspects for debugging/tracing support.

The plugin I'm currently working on (let's call it "dev" ) depends
various eclipse plugins (e.g. org.eclipse.ui, org.eclipse.emf etc) and
on other plugins of mine, including a "lib" one that contains all the
library jars I build on (eg log4j concurrent...).

I added aspectJ nature to the "dev" plugin project,

I included aspectjrt.jar (picked from ajdt 1.1.7) in the jars included
with the "lib" plugin.

I wrote a tracing aspect for the "dev" plugin:
---------
public aspect TraceAspect {

pointcut traceable() : !within(TraceAspect) &&
!preinitialization(*.new(..));

int indent=-1;

before() : traceable() {
indent++;
print(thisJoinPoint);
}

after() : traceable() {
indent--;
}

protected void print(org.aspectj.lang.JoinPoint jp) { ...
---------
rebuilt all

and launched the runtime workbench.

It starts up, some tracing takes place (I can see it in the console of
the host eclipse which captures stdout of the runtime WB) but when I
open editor/views that require classes from my plugins, things blow up:

note the last line of the stack I paste below :
Caused by: java.lang.StackOverflowError

any hints on what I do wrong ?

TIA
Edo

Error Wed Apr 21 14:44:10 BST 2004 Plug-in
"net.enigmatec.rif.eclipse.development" was unable to instantiate class
"net.enigmatec.rdk.RDKPlugin".
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Nativ e Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(Native ConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(De legatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:2 74)
at
org.eclipse.core.internal.plugins.PluginDescriptor.internalD oPluginActivation(PluginDescriptor.java:722)
at
org.eclipse.core.internal.plugins.PluginDescriptor.doPluginA ctivation(PluginDescriptor.java:188)
at
org.eclipse.core.internal.plugins.PluginClassLoader.activate Plugin(PluginClassLoader.java:112)
at
org.eclipse.core.internal.plugins.PluginClassLoader.internal FindClassParentsSelf(PluginClassLoader.java:185)
at
org.eclipse.core.internal.boot.DelegatingURLClassLoader.find ClassParentsSelf(DelegatingURLClassLoader.java:485)
at
org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(DelegatingURLClassLoader.java:882)
at
org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(DelegatingURLClassLoader.java:862)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at
org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension(PluginDescriptor.java:130)
at
org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension(PluginDescriptor.java:167)
at
org.eclipse.core.internal.plugins.ConfigurationElement.creat eExecutableExtension(ConfigurationElement.java:103)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:158)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
at
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java:155)
at
org.eclipse.ui.internal.registry.ViewDescriptor.createView(V iewDescriptor.java:51)
at org.eclipse.ui.internal.ViewFactory$2.run(ViewFactory.java:1 15)
at
org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java:1006)
at org.eclipse.core.runtime.Platform.run(Platform.java:413)
at org.eclipse.ui.internal.ViewFactory.busyRestoreView(ViewFact ory.java:98)
at org.eclipse.ui.internal.ViewFactory$1.run(ViewFactory.java:8 2)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
at org.eclipse.ui.internal.ViewFactory.restoreView(ViewFactory. java:78)
at org.eclipse.ui.internal.Perspective.showView(Perspective.jav a:1465)
at
org.eclipse.ui.internal.WorkbenchPage.busyShowView(Workbench Page.java:655)
at org.eclipse.ui.internal.WorkbenchPage.access$9(WorkbenchPage .java:634)
at org.eclipse.ui.internal.WorkbenchPage$13.run(WorkbenchPage.j ava:2777)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:2774)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:2764)
at org.eclipse.ui.internal.ShowViewMenu.showOther(ShowViewMenu. java:175)
at org.eclipse.ui.internal.ShowViewMenu.access$2(ShowViewMenu.j ava:161)
at org.eclipse.ui.internal.ShowViewMenu$2.run(ShowViewMenu.java :48)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:842 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:456)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Event(ActionContributionItem.java:403)
at
org.eclipse.jface.action.ActionContributionItem.access$0(Act ionContributionItem.java:397)
at
org.eclipse.jface.action.ActionContributionItem$ActionListen er.handleEvent(ActionContributionItem.java:72)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :81)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:923)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:1847)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1639)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1402)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
at
org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.java:858)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
at org.eclipse.core.launcher.Main.run(Main.java:747)
at org.eclipse.core.launcher.Main.main(Main.java:583)
Caused by: java.lang.StackOverflowError
Re: using AJ in eclipse plugins [message #35044 is a reply to message #34975] Wed, 21 April 2004 15:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: edoardoATenigmatecDOTnet.no.spam

Good news - project now works with ajdt 118.

I shut down eclipse, manually removed the ajdt 117 feature & plugins
directories, unzipped the 118 archive (slow to download!).

Cleaned projects, renamed aspect file to use .aj suffix,
simplified the aspect not to invoke toString() on the args and rebuilt
(feels faster with 118).

all is well ...


Edoardo Comar wrote:
> I am developing eclipse plugin projects, targeted to Eclipse 2.1, using
> Eclipse 3.0 (M8).
> I wanted to use some simple aspects for debugging/tracing support.
>
> The plugin I'm currently working on (let's call it "dev" ) depends
> various eclipse plugins (e.g. org.eclipse.ui, org.eclipse.emf etc) and
> on other plugins of mine, including a "lib" one that contains all the
> library jars I build on (eg log4j concurrent...).
>
> I added aspectJ nature to the "dev" plugin project,
>
> I included aspectjrt.jar (picked from ajdt 1.1.7) in the jars included
> with the "lib" plugin.
>
> I wrote a tracing aspect for the "dev" plugin:
> ---------
> public aspect TraceAspect {
>
> pointcut traceable() : !within(TraceAspect) &&
> !preinitialization(*.new(..));
>
> int indent=-1;
>
> before() : traceable() {
> indent++;
> print(thisJoinPoint);
> }
>
> after() : traceable() {
> indent--;
> }
>
> protected void print(org.aspectj.lang.JoinPoint jp) { ...
> ---------
> rebuilt all
>
> and launched the runtime workbench.
>
> It starts up, some tracing takes place (I can see it in the console of
> the host eclipse which captures stdout of the runtime WB) but when I
> open editor/views that require classes from my plugins, things blow up:
>
> note the last line of the stack I paste below :
> Caused by: java.lang.StackOverflowError
>
> any hints on what I do wrong ?
>
> TIA
> Edo
>
> Error Wed Apr 21 14:44:10 BST 2004 Plug-in
> "net.enigmatec.rif.eclipse.development" was unable to instantiate class
> "net.enigmatec.rdk.RDKPlugin".
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Nativ e
> Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(Native ConstructorAccessorImpl.java:39)
>
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(De legatingConstructorAccessorImpl.java:27)
>
> at java.lang.reflect.Constructor.newInstance(Constructor.java:2 74)
> at
> org.eclipse.core.internal.plugins.PluginDescriptor.internalD oPluginActivation(PluginDescriptor.java:722)
>
> at
> org.eclipse.core.internal.plugins.PluginDescriptor.doPluginA ctivation(PluginDescriptor.java:188)
>
> at
> org.eclipse.core.internal.plugins.PluginClassLoader.activate Plugin(PluginClassLoader.java:112)
>
> at
> org.eclipse.core.internal.plugins.PluginClassLoader.internal FindClassParentsSelf(PluginClassLoader.java:185)
>
> at
> org.eclipse.core.internal.boot.DelegatingURLClassLoader.find ClassParentsSelf(DelegatingURLClassLoader.java:485)
>
> at
> org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(DelegatingURLClassLoader.java:882)
>
> at
> org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(DelegatingURLClassLoader.java:862)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
> at
> org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension(PluginDescriptor.java:130)
>
> at
> org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension(PluginDescriptor.java:167)
>
> at
> org.eclipse.core.internal.plugins.ConfigurationElement.creat eExecutableExtension(ConfigurationElement.java:103)
>
> at
> org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:158)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> at
> org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java:155)
>
> at
> org.eclipse.ui.internal.registry.ViewDescriptor.createView(V iewDescriptor.java:51)
>
> at org.eclipse.ui.internal.ViewFactory$2.run(ViewFactory.java:1 15)
> at
> org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java:1006)
>
> at org.eclipse.core.runtime.Platform.run(Platform.java:413)
> at
> org.eclipse.ui.internal.ViewFactory.busyRestoreView(ViewFact ory.java:98)
> at org.eclipse.ui.internal.ViewFactory$1.run(ViewFactory.java:8 2)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> at org.eclipse.ui.internal.ViewFactory.restoreView(ViewFactory. java:78)
> at org.eclipse.ui.internal.Perspective.showView(Perspective.jav a:1465)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyShowView(Workbench Page.java:655)
> at
> org.eclipse.ui.internal.WorkbenchPage.access$9(WorkbenchPage .java:634)
> at
> org.eclipse.ui.internal.WorkbenchPage$13.run(WorkbenchPage.j ava:2777)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> at
> org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:2774)
> at
> org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:2764)
> at
> org.eclipse.ui.internal.ShowViewMenu.showOther(ShowViewMenu. java:175)
> at org.eclipse.ui.internal.ShowViewMenu.access$2(ShowViewMenu.j ava:161)
> at org.eclipse.ui.internal.ShowViewMenu$2.run(ShowViewMenu.java :48)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:842 )
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:456)
>
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Event(ActionContributionItem.java:403)
>
> at
> org.eclipse.jface.action.ActionContributionItem.access$0(Act ionContributionItem.java:397)
>
> at
> org.eclipse.jface.action.ActionContributionItem$ActionListen er.handleEvent(ActionContributionItem.java:72)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :81)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:923)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:1847)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1639)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1402)
> at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
> at
> org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.java:858)
>
> at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
> at org.eclipse.core.launcher.Main.run(Main.java:747)
> at org.eclipse.core.launcher.Main.main(Main.java:583)
> Caused by: java.lang.StackOverflowError
>
Re: using AJ in eclipse plugins [message #38224 is a reply to message #35044] Wed, 14 July 2004 13:20 Go to previous messageGo to next message
Dennis Fuglsang is currently offline Dennis FuglsangFriend
Messages: 77
Registered: July 2009
Member
Edoardo,

I have a similar project to the one you have described in your posting. I
am developing a eclipse plugin project, also targeted to Eclipse 2.1, using
Eclipse 3.0 GA, and I would like to add some debugging/tracing support to
one or more of the org.eclipse.emf projects. The plugin containing my
aspects depends upon those emf projects compiles successfully modifying the
appropriate emf class files (I also see the aspect class file within the
output jar). I encounter problems when I try running my application in the
Eclipse runtime environment. When the pointcut is encountered in the emf
code I get a java.lang.NoClassDefFoundError exception listing the aspect.

Do the aspects and the code containing the join points need to be in the
same Eclipse project? That would seem to severly limit the power of
cross-cutting multiple projects. How do Eclipse project dependencies and
project classloaders work with aspects and AJDT?

Any help you can provide would be greatly appreciated. Thanks

Dennis Fuglsang

"Edoardo Comar" <edoardoATenigmatecDOTnet@no.spam> wrote in message
news:c662r9$1g8$1@eclipse.org...
> Good news - project now works with ajdt 118.
>
> I shut down eclipse, manually removed the ajdt 117 feature & plugins
> directories, unzipped the 118 archive (slow to download!).
>
> Cleaned projects, renamed aspect file to use .aj suffix,
> simplified the aspect not to invoke toString() on the args and rebuilt
> (feels faster with 118).
>
> all is well ...
>
>
> Edoardo Comar wrote:
> > I am developing eclipse plugin projects, targeted to Eclipse 2.1, using
> > Eclipse 3.0 (M8).
> > I wanted to use some simple aspects for debugging/tracing support.
> >
> > The plugin I'm currently working on (let's call it "dev" ) depends
> > various eclipse plugins (e.g. org.eclipse.ui, org.eclipse.emf etc) and
> > on other plugins of mine, including a "lib" one that contains all the
> > library jars I build on (eg log4j concurrent...).
> >
> > I added aspectJ nature to the "dev" plugin project,
> >
> > I included aspectjrt.jar (picked from ajdt 1.1.7) in the jars included
> > with the "lib" plugin.
> >
> > I wrote a tracing aspect for the "dev" plugin:
> > ---------
> > public aspect TraceAspect {
> >
> > pointcut traceable() : !within(TraceAspect) &&
> > !preinitialization(*.new(..));
> >
> > int indent=-1;
> >
> > before() : traceable() {
> > indent++;
> > print(thisJoinPoint);
> > }
> >
> > after() : traceable() {
> > indent--;
> > }
> >
> > protected void print(org.aspectj.lang.JoinPoint jp) { ...
> > ---------
> > rebuilt all
> >
> > and launched the runtime workbench.
> >
> > It starts up, some tracing takes place (I can see it in the console of
> > the host eclipse which captures stdout of the runtime WB) but when I
> > open editor/views that require classes from my plugins, things blow up:
> >
> > note the last line of the stack I paste below :
> > Caused by: java.lang.StackOverflowError
> >
> > any hints on what I do wrong ?
> >
> > TIA
> > Edo
> >
> > Error Wed Apr 21 14:44:10 BST 2004 Plug-in
> > "net.enigmatec.rif.eclipse.development" was unable to instantiate class
> > "net.enigmatec.rdk.RDKPlugin".
> > java.lang.reflect.InvocationTargetException
> > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Nativ e
> > Method)
> > at
> >
sun.reflect.NativeConstructorAccessorImpl.newInstance(Native ConstructorAcces
sorImpl.java:39)
> >
> > at
> >
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(De legatingConstruc
torAccessorImpl.java:27)
> >
> > at java.lang.reflect.Constructor.newInstance(Constructor.java:2 74)
> > at
> >
org.eclipse.core.internal.plugins.PluginDescriptor.internalD oPluginActivatio
n(PluginDescriptor.java:722)
> >
> > at
> >
org.eclipse.core.internal.plugins.PluginDescriptor.doPluginA ctivation(Plugin
Descriptor.java:188)
> >
> > at
> >
org.eclipse.core.internal.plugins.PluginClassLoader.activate Plugin(PluginCla
ssLoader.java:112)
> >
> > at
> >
org.eclipse.core.internal.plugins.PluginClassLoader.internal FindClassParents
Self(PluginClassLoader.java:185)
> >
> > at
> >
org.eclipse.core.internal.boot.DelegatingURLClassLoader.find ClassParentsSelf
(DelegatingURLClassLoader.java:485)
> >
> > at
> >
org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(Delegating
URLClassLoader.java:882)
> >
> > at
> >
org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(Delegating
URLClassLoader.java:862)
> >
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
> > at
> >
org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension
(PluginDescriptor.java:130)
> >
> > at
> >
org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension
(PluginDescriptor.java:167)
> >
> > at
> >
org.eclipse.core.internal.plugins.ConfigurationElement.creat eExecutableExten
sion(ConfigurationElement.java:103)
> >
> > at
> > org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:158)
> > at
> > org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> > at
> >
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java
:155)
> >
> > at
> >
org.eclipse.ui.internal.registry.ViewDescriptor.createView(V iewDescriptor.ja
va:51)
> >
> > at org.eclipse.ui.internal.ViewFactory$2.run(ViewFactory.java:1 15)
> > at
> >
org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java
:1006)
> >
> > at org.eclipse.core.runtime.Platform.run(Platform.java:413)
> > at
> > org.eclipse.ui.internal.ViewFactory.busyRestoreView(ViewFact ory.java:98)
> > at org.eclipse.ui.internal.ViewFactory$1.run(ViewFactory.java:8 2)
> > at
> > org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> > at
org.eclipse.ui.internal.ViewFactory.restoreView(ViewFactory. java:78)
> > at
org.eclipse.ui.internal.Perspective.showView(Perspective.jav a:1465)
> > at
> >
org.eclipse.ui.internal.WorkbenchPage.busyShowView(Workbench Page.java:655)
> > at
> > org.eclipse.ui.internal.WorkbenchPage.access$9(WorkbenchPage .java:634)
> > at
> > org.eclipse.ui.internal.WorkbenchPage$13.run(WorkbenchPage.j ava:2777)
> > at
> > org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> > at
> > org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:2774)
> > at
> > org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:2764)
> > at
> > org.eclipse.ui.internal.ShowViewMenu.showOther(ShowViewMenu. java:175)
> > at
org.eclipse.ui.internal.ShowViewMenu.access$2(ShowViewMenu.j ava:161)
> > at org.eclipse.ui.internal.ShowViewMenu$2.run(ShowViewMenu.java :48)
> > at org.eclipse.jface.action.Action.runWithEvent(Action.java:842 )
> > at
> >
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
ContributionItem.java:456)
> >
> > at
> >
org.eclipse.jface.action.ActionContributionItem.handleWidget Event(ActionCont
ributionItem.java:403)
> >
> > at
> >
org.eclipse.jface.action.ActionContributionItem.access$0(Act ionContributionI
tem.java:397)
> >
> > at
> >
org.eclipse.jface.action.ActionContributionItem$ActionListen er.handleEvent(A
ctionContributionItem.java:72)
> >
> > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :81)
> > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:923)
> > at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:1847)
> > at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1639)
> > at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1402)
> > at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
> > at
> >
org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.jav
a:858)
> >
> > at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39
)
> >
> > at
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
..java:25)
> >
> > at java.lang.reflect.Method.invoke(Method.java:324)
> > at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
> > at org.eclipse.core.launcher.Main.run(Main.java:747)
> > at org.eclipse.core.launcher.Main.main(Main.java:583)
> > Caused by: java.lang.StackOverflowError
> >
Re: using AJ in eclipse plugins [message #38325 is a reply to message #38224] Wed, 14 July 2004 20:59 Go to previous message
Eclipse UserFriend
Originally posted by: george_harley.ntlworld.com

Hi Dennis,

Please see my response to your other posting today.

Best regards,
George

Dennis Fuglsang wrote:

> Edoardo,
>
> I have a similar project to the one you have described in your posting. I
> am developing a eclipse plugin project, also targeted to Eclipse 2.1, using
> Eclipse 3.0 GA, and I would like to add some debugging/tracing support to
> one or more of the org.eclipse.emf projects. The plugin containing my
> aspects depends upon those emf projects compiles successfully modifying the
> appropriate emf class files (I also see the aspect class file within the
> output jar). I encounter problems when I try running my application in the
> Eclipse runtime environment. When the pointcut is encountered in the emf
> code I get a java.lang.NoClassDefFoundError exception listing the aspect.
>
> Do the aspects and the code containing the join points need to be in the
> same Eclipse project? That would seem to severly limit the power of
> cross-cutting multiple projects. How do Eclipse project dependencies and
> project classloaders work with aspects and AJDT?
>
> Any help you can provide would be greatly appreciated. Thanks
>
> Dennis Fuglsang
>
> "Edoardo Comar" <edoardoATenigmatecDOTnet@no.spam> wrote in message
> news:c662r9$1g8$1@eclipse.org...
>
>>Good news - project now works with ajdt 118.
>>
>>I shut down eclipse, manually removed the ajdt 117 feature & plugins
>>directories, unzipped the 118 archive (slow to download!).
>>
>>Cleaned projects, renamed aspect file to use .aj suffix,
>>simplified the aspect not to invoke toString() on the args and rebuilt
>>(feels faster with 118).
>>
>>all is well ...
>>
>>
>>Edoardo Comar wrote:
>>
>>>I am developing eclipse plugin projects, targeted to Eclipse 2.1, using
>>>Eclipse 3.0 (M8).
>>>I wanted to use some simple aspects for debugging/tracing support.
>>>
>>>The plugin I'm currently working on (let's call it "dev" ) depends
>>>various eclipse plugins (e.g. org.eclipse.ui, org.eclipse.emf etc) and
>>>on other plugins of mine, including a "lib" one that contains all the
>>>library jars I build on (eg log4j concurrent...).
>>>
>>>I added aspectJ nature to the "dev" plugin project,
>>>
>>>I included aspectjrt.jar (picked from ajdt 1.1.7) in the jars included
>>>with the "lib" plugin.
>>>
>>>I wrote a tracing aspect for the "dev" plugin:
>>>---------
>>>public aspect TraceAspect {
>>>
>>> pointcut traceable() : !within(TraceAspect) &&
>>>!preinitialization(*.new(..));
>>>
>>> int indent=-1;
>>>
>>> before() : traceable() {
>>> indent++;
>>> print(thisJoinPoint);
>>> }
>>>
>>> after() : traceable() {
>>> indent--;
>>> }
>>>
>>> protected void print(org.aspectj.lang.JoinPoint jp) { ...
>>>---------
>>>rebuilt all
>>>
>>>and launched the runtime workbench.
>>>
>>>It starts up, some tracing takes place (I can see it in the console of
>>>the host eclipse which captures stdout of the runtime WB) but when I
>>>open editor/views that require classes from my plugins, things blow up:
>>>
>>>note the last line of the stack I paste below :
>>>Caused by: java.lang.StackOverflowError
>>>
>>>any hints on what I do wrong ?
>>>
>>>TIA
>>>Edo
>>>
>>>Error Wed Apr 21 14:44:10 BST 2004 Plug-in
>>>"net.enigmatec.rif.eclipse.development" was unable to instantiate class
>>>"net.enigmatec.rdk.RDKPlugin".
>>>java.lang.reflect.InvocationTargetException
>>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Nativ e
>>>Method)
>>> at
>>>
>
> sun.reflect.NativeConstructorAccessorImpl.newInstance(Native ConstructorAcces
> sorImpl.java:39)
>
>>> at
>>>
>
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(De legatingConstruc
> torAccessorImpl.java:27)
>
>>> at java.lang.reflect.Constructor.newInstance(Constructor.java:2 74)
>>> at
>>>
>
> org.eclipse.core.internal.plugins.PluginDescriptor.internalD oPluginActivatio
> n(PluginDescriptor.java:722)
>
>>> at
>>>
>
> org.eclipse.core.internal.plugins.PluginDescriptor.doPluginA ctivation(Plugin
> Descriptor.java:188)
>
>>> at
>>>
>
> org.eclipse.core.internal.plugins.PluginClassLoader.activate Plugin(PluginCla
> ssLoader.java:112)
>
>>> at
>>>
>
> org.eclipse.core.internal.plugins.PluginClassLoader.internal FindClassParents
> Self(PluginClassLoader.java:185)
>
>>> at
>>>
>
> org.eclipse.core.internal.boot.DelegatingURLClassLoader.find ClassParentsSelf
> (DelegatingURLClassLoader.java:485)
>
>>> at
>>>
>
> org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(Delegating
> URLClassLoader.java:882)
>
>>> at
>>>
>
> org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(Delegating
> URLClassLoader.java:862)
>
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>>> at
>>>
>
> org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension
> (PluginDescriptor.java:130)
>
>>> at
>>>
>
> org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension
> (PluginDescriptor.java:167)
>
>>> at
>>>
>
> org.eclipse.core.internal.plugins.ConfigurationElement.creat eExecutableExten
> sion(ConfigurationElement.java:103)
>
>>> at
>>> org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:158)
>>> at
>>> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
>>> at
>>>
>
> org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java
> :155)
>
>>> at
>>>
>
> org.eclipse.ui.internal.registry.ViewDescriptor.createView(V iewDescriptor.ja
> va:51)
>
>>> at org.eclipse.ui.internal.ViewFactory$2.run(ViewFactory.java:1 15)
>>> at
>>>
>
> org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java
> :1006)
>
>>> at org.eclipse.core.runtime.Platform.run(Platform.java:413)
>>> at
>>> org.eclipse.ui.internal.ViewFactory.busyRestoreView(ViewFact ory.java:98)
>>> at org.eclipse.ui.internal.ViewFactory$1.run(ViewFactory.java:8 2)
>>> at
>>> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
>>> at
>
> org.eclipse.ui.internal.ViewFactory.restoreView(ViewFactory. java:78)
>
>>> at
>
> org.eclipse.ui.internal.Perspective.showView(Perspective.jav a:1465)
>
>>> at
>>>
>
> org.eclipse.ui.internal.WorkbenchPage.busyShowView(Workbench Page.java:655)
>
>>> at
>>> org.eclipse.ui.internal.WorkbenchPage.access$9(WorkbenchPage .java:634)
>>> at
>>> org.eclipse.ui.internal.WorkbenchPage$13.run(WorkbenchPage.j ava:2777)
>>> at
>>> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
>>> at
>>> org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:2774)
>>> at
>>> org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:2764)
>>> at
>>> org.eclipse.ui.internal.ShowViewMenu.showOther(ShowViewMenu. java:175)
>>> at
>
> org.eclipse.ui.internal.ShowViewMenu.access$2(ShowViewMenu.j ava:161)
>
>>> at org.eclipse.ui.internal.ShowViewMenu$2.run(ShowViewMenu.java :48)
>>> at org.eclipse.jface.action.Action.runWithEvent(Action.java:842 )
>>> at
>>>
>
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
> ContributionItem.java:456)
>
>>> at
>>>
>
> org.eclipse.jface.action.ActionContributionItem.handleWidget Event(ActionCont
> ributionItem.java:403)
>
>>> at
>>>
>
> org.eclipse.jface.action.ActionContributionItem.access$0(Act ionContributionI
> tem.java:397)
>
>>> at
>>>
>
> org.eclipse.jface.action.ActionContributionItem$ActionListen er.handleEvent(A
> ctionContributionItem.java:72)
>
>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :81)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:923)
>>> at
>
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:1847)
>
>>> at
>
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1639)
>
>>> at
>
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1402)
>
>>> at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
>>> at
>>>
>
> org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.jav
> a:858)
>
>>> at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>>
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39
> )
>
>>> at
>>>
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
> .java:25)
>
>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
>>> at org.eclipse.core.launcher.Main.run(Main.java:747)
>>> at org.eclipse.core.launcher.Main.main(Main.java:583)
>>>Caused by: java.lang.StackOverflowError
>>>
>
>
>
Re: using AJ in eclipse plugins [message #579099 is a reply to message #34975] Wed, 21 April 2004 15:15 Go to previous message
Edoardo Comar is currently offline Edoardo ComarFriend
Messages: 28
Registered: July 2009
Junior Member
Good news - project now works with ajdt 118.

I shut down eclipse, manually removed the ajdt 117 feature & plugins
directories, unzipped the 118 archive (slow to download!).

Cleaned projects, renamed aspect file to use .aj suffix,
simplified the aspect not to invoke toString() on the args and rebuilt
(feels faster with 118).

all is well ...


Edoardo Comar wrote:
> I am developing eclipse plugin projects, targeted to Eclipse 2.1, using
> Eclipse 3.0 (M8).
> I wanted to use some simple aspects for debugging/tracing support.
>
> The plugin I'm currently working on (let's call it "dev" ) depends
> various eclipse plugins (e.g. org.eclipse.ui, org.eclipse.emf etc) and
> on other plugins of mine, including a "lib" one that contains all the
> library jars I build on (eg log4j concurrent...).
>
> I added aspectJ nature to the "dev" plugin project,
>
> I included aspectjrt.jar (picked from ajdt 1.1.7) in the jars included
> with the "lib" plugin.
>
> I wrote a tracing aspect for the "dev" plugin:
> ---------
> public aspect TraceAspect {
>
> pointcut traceable() : !within(TraceAspect) &&
> !preinitialization(*.new(..));
>
> int indent=-1;
>
> before() : traceable() {
> indent++;
> print(thisJoinPoint);
> }
>
> after() : traceable() {
> indent--;
> }
>
> protected void print(org.aspectj.lang.JoinPoint jp) { ...
> ---------
> rebuilt all
>
> and launched the runtime workbench.
>
> It starts up, some tracing takes place (I can see it in the console of
> the host eclipse which captures stdout of the runtime WB) but when I
> open editor/views that require classes from my plugins, things blow up:
>
> note the last line of the stack I paste below :
> Caused by: java.lang.StackOverflowError
>
> any hints on what I do wrong ?
>
> TIA
> Edo
>
> Error Wed Apr 21 14:44:10 BST 2004 Plug-in
> "net.enigmatec.rif.eclipse.development" was unable to instantiate class
> "net.enigmatec.rdk.RDKPlugin".
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Nativ e
> Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(Native ConstructorAccessorImpl.java:39)
>
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(De legatingConstructorAccessorImpl.java:27)
>
> at java.lang.reflect.Constructor.newInstance(Constructor.java:2 74)
> at
> org.eclipse.core.internal.plugins.PluginDescriptor.internalD oPluginActivation(PluginDescriptor.java:722)
>
> at
> org.eclipse.core.internal.plugins.PluginDescriptor.doPluginA ctivation(PluginDescriptor.java:188)
>
> at
> org.eclipse.core.internal.plugins.PluginClassLoader.activate Plugin(PluginClassLoader.java:112)
>
> at
> org.eclipse.core.internal.plugins.PluginClassLoader.internal FindClassParentsSelf(PluginClassLoader.java:185)
>
> at
> org.eclipse.core.internal.boot.DelegatingURLClassLoader.find ClassParentsSelf(DelegatingURLClassLoader.java:485)
>
> at
> org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(DelegatingURLClassLoader.java:882)
>
> at
> org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(DelegatingURLClassLoader.java:862)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
> at
> org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension(PluginDescriptor.java:130)
>
> at
> org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension(PluginDescriptor.java:167)
>
> at
> org.eclipse.core.internal.plugins.ConfigurationElement.creat eExecutableExtension(ConfigurationElement.java:103)
>
> at
> org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:158)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> at
> org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java:155)
>
> at
> org.eclipse.ui.internal.registry.ViewDescriptor.createView(V iewDescriptor.java:51)
>
> at org.eclipse.ui.internal.ViewFactory$2.run(ViewFactory.java:1 15)
> at
> org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java:1006)
>
> at org.eclipse.core.runtime.Platform.run(Platform.java:413)
> at
> org.eclipse.ui.internal.ViewFactory.busyRestoreView(ViewFact ory.java:98)
> at org.eclipse.ui.internal.ViewFactory$1.run(ViewFactory.java:8 2)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> at org.eclipse.ui.internal.ViewFactory.restoreView(ViewFactory. java:78)
> at org.eclipse.ui.internal.Perspective.showView(Perspective.jav a:1465)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyShowView(Workbench Page.java:655)
> at
> org.eclipse.ui.internal.WorkbenchPage.access$9(WorkbenchPage .java:634)
> at
> org.eclipse.ui.internal.WorkbenchPage$13.run(WorkbenchPage.j ava:2777)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> at
> org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:2774)
> at
> org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:2764)
> at
> org.eclipse.ui.internal.ShowViewMenu.showOther(ShowViewMenu. java:175)
> at org.eclipse.ui.internal.ShowViewMenu.access$2(ShowViewMenu.j ava:161)
> at org.eclipse.ui.internal.ShowViewMenu$2.run(ShowViewMenu.java :48)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:842 )
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:456)
>
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Event(ActionContributionItem.java:403)
>
> at
> org.eclipse.jface.action.ActionContributionItem.access$0(Act ionContributionItem.java:397)
>
> at
> org.eclipse.jface.action.ActionContributionItem$ActionListen er.handleEvent(ActionContributionItem.java:72)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :81)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:923)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:1847)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1639)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1402)
> at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
> at
> org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.java:858)
>
> at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
> at org.eclipse.core.launcher.Main.run(Main.java:747)
> at org.eclipse.core.launcher.Main.main(Main.java:583)
> Caused by: java.lang.StackOverflowError
>
Re: using AJ in eclipse plugins [message #581310 is a reply to message #35044] Wed, 14 July 2004 13:20 Go to previous message
Dennis Fuglsang is currently offline Dennis FuglsangFriend
Messages: 77
Registered: July 2009
Member
Edoardo,

I have a similar project to the one you have described in your posting. I
am developing a eclipse plugin project, also targeted to Eclipse 2.1, using
Eclipse 3.0 GA, and I would like to add some debugging/tracing support to
one or more of the org.eclipse.emf projects. The plugin containing my
aspects depends upon those emf projects compiles successfully modifying the
appropriate emf class files (I also see the aspect class file within the
output jar). I encounter problems when I try running my application in the
Eclipse runtime environment. When the pointcut is encountered in the emf
code I get a java.lang.NoClassDefFoundError exception listing the aspect.

Do the aspects and the code containing the join points need to be in the
same Eclipse project? That would seem to severly limit the power of
cross-cutting multiple projects. How do Eclipse project dependencies and
project classloaders work with aspects and AJDT?

Any help you can provide would be greatly appreciated. Thanks

Dennis Fuglsang

"Edoardo Comar" <edoardoATenigmatecDOTnet@no.spam> wrote in message
news:c662r9$1g8$1@eclipse.org...
> Good news - project now works with ajdt 118.
>
> I shut down eclipse, manually removed the ajdt 117 feature & plugins
> directories, unzipped the 118 archive (slow to download!).
>
> Cleaned projects, renamed aspect file to use .aj suffix,
> simplified the aspect not to invoke toString() on the args and rebuilt
> (feels faster with 118).
>
> all is well ...
>
>
> Edoardo Comar wrote:
> > I am developing eclipse plugin projects, targeted to Eclipse 2.1, using
> > Eclipse 3.0 (M8).
> > I wanted to use some simple aspects for debugging/tracing support.
> >
> > The plugin I'm currently working on (let's call it "dev" ) depends
> > various eclipse plugins (e.g. org.eclipse.ui, org.eclipse.emf etc) and
> > on other plugins of mine, including a "lib" one that contains all the
> > library jars I build on (eg log4j concurrent...).
> >
> > I added aspectJ nature to the "dev" plugin project,
> >
> > I included aspectjrt.jar (picked from ajdt 1.1.7) in the jars included
> > with the "lib" plugin.
> >
> > I wrote a tracing aspect for the "dev" plugin:
> > ---------
> > public aspect TraceAspect {
> >
> > pointcut traceable() : !within(TraceAspect) &&
> > !preinitialization(*.new(..));
> >
> > int indent=-1;
> >
> > before() : traceable() {
> > indent++;
> > print(thisJoinPoint);
> > }
> >
> > after() : traceable() {
> > indent--;
> > }
> >
> > protected void print(org.aspectj.lang.JoinPoint jp) { ...
> > ---------
> > rebuilt all
> >
> > and launched the runtime workbench.
> >
> > It starts up, some tracing takes place (I can see it in the console of
> > the host eclipse which captures stdout of the runtime WB) but when I
> > open editor/views that require classes from my plugins, things blow up:
> >
> > note the last line of the stack I paste below :
> > Caused by: java.lang.StackOverflowError
> >
> > any hints on what I do wrong ?
> >
> > TIA
> > Edo
> >
> > Error Wed Apr 21 14:44:10 BST 2004 Plug-in
> > "net.enigmatec.rif.eclipse.development" was unable to instantiate class
> > "net.enigmatec.rdk.RDKPlugin".
> > java.lang.reflect.InvocationTargetException
> > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Nativ e
> > Method)
> > at
> >
sun.reflect.NativeConstructorAccessorImpl.newInstance(Native ConstructorAcces
sorImpl.java:39)
> >
> > at
> >
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(De legatingConstruc
torAccessorImpl.java:27)
> >
> > at java.lang.reflect.Constructor.newInstance(Constructor.java:2 74)
> > at
> >
org.eclipse.core.internal.plugins.PluginDescriptor.internalD oPluginActivatio
n(PluginDescriptor.java:722)
> >
> > at
> >
org.eclipse.core.internal.plugins.PluginDescriptor.doPluginA ctivation(Plugin
Descriptor.java:188)
> >
> > at
> >
org.eclipse.core.internal.plugins.PluginClassLoader.activate Plugin(PluginCla
ssLoader.java:112)
> >
> > at
> >
org.eclipse.core.internal.plugins.PluginClassLoader.internal FindClassParents
Self(PluginClassLoader.java:185)
> >
> > at
> >
org.eclipse.core.internal.boot.DelegatingURLClassLoader.find ClassParentsSelf
(DelegatingURLClassLoader.java:485)
> >
> > at
> >
org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(Delegating
URLClassLoader.java:882)
> >
> > at
> >
org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(Delegating
URLClassLoader.java:862)
> >
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
> > at
> >
org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension
(PluginDescriptor.java:130)
> >
> > at
> >
org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension
(PluginDescriptor.java:167)
> >
> > at
> >
org.eclipse.core.internal.plugins.ConfigurationElement.creat eExecutableExten
sion(ConfigurationElement.java:103)
> >
> > at
> > org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:158)
> > at
> > org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> > at
> >
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java
:155)
> >
> > at
> >
org.eclipse.ui.internal.registry.ViewDescriptor.createView(V iewDescriptor.ja
va:51)
> >
> > at org.eclipse.ui.internal.ViewFactory$2.run(ViewFactory.java:1 15)
> > at
> >
org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java
:1006)
> >
> > at org.eclipse.core.runtime.Platform.run(Platform.java:413)
> > at
> > org.eclipse.ui.internal.ViewFactory.busyRestoreView(ViewFact ory.java:98)
> > at org.eclipse.ui.internal.ViewFactory$1.run(ViewFactory.java:8 2)
> > at
> > org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> > at
org.eclipse.ui.internal.ViewFactory.restoreView(ViewFactory. java:78)
> > at
org.eclipse.ui.internal.Perspective.showView(Perspective.jav a:1465)
> > at
> >
org.eclipse.ui.internal.WorkbenchPage.busyShowView(Workbench Page.java:655)
> > at
> > org.eclipse.ui.internal.WorkbenchPage.access$9(WorkbenchPage .java:634)
> > at
> > org.eclipse.ui.internal.WorkbenchPage$13.run(WorkbenchPage.j ava:2777)
> > at
> > org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> > at
> > org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:2774)
> > at
> > org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:2764)
> > at
> > org.eclipse.ui.internal.ShowViewMenu.showOther(ShowViewMenu. java:175)
> > at
org.eclipse.ui.internal.ShowViewMenu.access$2(ShowViewMenu.j ava:161)
> > at org.eclipse.ui.internal.ShowViewMenu$2.run(ShowViewMenu.java :48)
> > at org.eclipse.jface.action.Action.runWithEvent(Action.java:842 )
> > at
> >
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
ContributionItem.java:456)
> >
> > at
> >
org.eclipse.jface.action.ActionContributionItem.handleWidget Event(ActionCont
ributionItem.java:403)
> >
> > at
> >
org.eclipse.jface.action.ActionContributionItem.access$0(Act ionContributionI
tem.java:397)
> >
> > at
> >
org.eclipse.jface.action.ActionContributionItem$ActionListen er.handleEvent(A
ctionContributionItem.java:72)
> >
> > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :81)
> > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:923)
> > at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:1847)
> > at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1639)
> > at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1402)
> > at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
> > at
> >
org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.jav
a:858)
> >
> > at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39
)
> >
> > at
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
..java:25)
> >
> > at java.lang.reflect.Method.invoke(Method.java:324)
> > at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
> > at org.eclipse.core.launcher.Main.run(Main.java:747)
> > at org.eclipse.core.launcher.Main.main(Main.java:583)
> > Caused by: java.lang.StackOverflowError
> >
Re: using AJ in eclipse plugins [message #581368 is a reply to message #38224] Wed, 14 July 2004 20:59 Go to previous message
George Harley is currently offline George HarleyFriend
Messages: 70
Registered: July 2009
Member
Hi Dennis,

Please see my response to your other posting today.

Best regards,
George

Dennis Fuglsang wrote:

> Edoardo,
>
> I have a similar project to the one you have described in your posting. I
> am developing a eclipse plugin project, also targeted to Eclipse 2.1, using
> Eclipse 3.0 GA, and I would like to add some debugging/tracing support to
> one or more of the org.eclipse.emf projects. The plugin containing my
> aspects depends upon those emf projects compiles successfully modifying the
> appropriate emf class files (I also see the aspect class file within the
> output jar). I encounter problems when I try running my application in the
> Eclipse runtime environment. When the pointcut is encountered in the emf
> code I get a java.lang.NoClassDefFoundError exception listing the aspect.
>
> Do the aspects and the code containing the join points need to be in the
> same Eclipse project? That would seem to severly limit the power of
> cross-cutting multiple projects. How do Eclipse project dependencies and
> project classloaders work with aspects and AJDT?
>
> Any help you can provide would be greatly appreciated. Thanks
>
> Dennis Fuglsang
>
> "Edoardo Comar" <edoardoATenigmatecDOTnet@no.spam> wrote in message
> news:c662r9$1g8$1@eclipse.org...
>
>>Good news - project now works with ajdt 118.
>>
>>I shut down eclipse, manually removed the ajdt 117 feature & plugins
>>directories, unzipped the 118 archive (slow to download!).
>>
>>Cleaned projects, renamed aspect file to use .aj suffix,
>>simplified the aspect not to invoke toString() on the args and rebuilt
>>(feels faster with 118).
>>
>>all is well ...
>>
>>
>>Edoardo Comar wrote:
>>
>>>I am developing eclipse plugin projects, targeted to Eclipse 2.1, using
>>>Eclipse 3.0 (M8).
>>>I wanted to use some simple aspects for debugging/tracing support.
>>>
>>>The plugin I'm currently working on (let's call it "dev" ) depends
>>>various eclipse plugins (e.g. org.eclipse.ui, org.eclipse.emf etc) and
>>>on other plugins of mine, including a "lib" one that contains all the
>>>library jars I build on (eg log4j concurrent...).
>>>
>>>I added aspectJ nature to the "dev" plugin project,
>>>
>>>I included aspectjrt.jar (picked from ajdt 1.1.7) in the jars included
>>>with the "lib" plugin.
>>>
>>>I wrote a tracing aspect for the "dev" plugin:
>>>---------
>>>public aspect TraceAspect {
>>>
>>> pointcut traceable() : !within(TraceAspect) &&
>>>!preinitialization(*.new(..));
>>>
>>> int indent=-1;
>>>
>>> before() : traceable() {
>>> indent++;
>>> print(thisJoinPoint);
>>> }
>>>
>>> after() : traceable() {
>>> indent--;
>>> }
>>>
>>> protected void print(org.aspectj.lang.JoinPoint jp) { ...
>>>---------
>>>rebuilt all
>>>
>>>and launched the runtime workbench.
>>>
>>>It starts up, some tracing takes place (I can see it in the console of
>>>the host eclipse which captures stdout of the runtime WB) but when I
>>>open editor/views that require classes from my plugins, things blow up:
>>>
>>>note the last line of the stack I paste below :
>>>Caused by: java.lang.StackOverflowError
>>>
>>>any hints on what I do wrong ?
>>>
>>>TIA
>>>Edo
>>>
>>>Error Wed Apr 21 14:44:10 BST 2004 Plug-in
>>>"net.enigmatec.rif.eclipse.development" was unable to instantiate class
>>>"net.enigmatec.rdk.RDKPlugin".
>>>java.lang.reflect.InvocationTargetException
>>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Nativ e
>>>Method)
>>> at
>>>
>
> sun.reflect.NativeConstructorAccessorImpl.newInstance(Native ConstructorAcces
> sorImpl.java:39)
>
>>> at
>>>
>
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(De legatingConstruc
> torAccessorImpl.java:27)
>
>>> at java.lang.reflect.Constructor.newInstance(Constructor.java:2 74)
>>> at
>>>
>
> org.eclipse.core.internal.plugins.PluginDescriptor.internalD oPluginActivatio
> n(PluginDescriptor.java:722)
>
>>> at
>>>
>
> org.eclipse.core.internal.plugins.PluginDescriptor.doPluginA ctivation(Plugin
> Descriptor.java:188)
>
>>> at
>>>
>
> org.eclipse.core.internal.plugins.PluginClassLoader.activate Plugin(PluginCla
> ssLoader.java:112)
>
>>> at
>>>
>
> org.eclipse.core.internal.plugins.PluginClassLoader.internal FindClassParents
> Self(PluginClassLoader.java:185)
>
>>> at
>>>
>
> org.eclipse.core.internal.boot.DelegatingURLClassLoader.find ClassParentsSelf
> (DelegatingURLClassLoader.java:485)
>
>>> at
>>>
>
> org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(Delegating
> URLClassLoader.java:882)
>
>>> at
>>>
>
> org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(Delegating
> URLClassLoader.java:862)
>
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>>> at
>>>
>
> org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension
> (PluginDescriptor.java:130)
>
>>> at
>>>
>
> org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension
> (PluginDescriptor.java:167)
>
>>> at
>>>
>
> org.eclipse.core.internal.plugins.ConfigurationElement.creat eExecutableExten
> sion(ConfigurationElement.java:103)
>
>>> at
>>> org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:158)
>>> at
>>> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
>>> at
>>>
>
> org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java
> :155)
>
>>> at
>>>
>
> org.eclipse.ui.internal.registry.ViewDescriptor.createView(V iewDescriptor.ja
> va:51)
>
>>> at org.eclipse.ui.internal.ViewFactory$2.run(ViewFactory.java:1 15)
>>> at
>>>
>
> org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java
> :1006)
>
>>> at org.eclipse.core.runtime.Platform.run(Platform.java:413)
>>> at
>>> org.eclipse.ui.internal.ViewFactory.busyRestoreView(ViewFact ory.java:98)
>>> at org.eclipse.ui.internal.ViewFactory$1.run(ViewFactory.java:8 2)
>>> at
>>> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
>>> at
>
> org.eclipse.ui.internal.ViewFactory.restoreView(ViewFactory. java:78)
>
>>> at
>
> org.eclipse.ui.internal.Perspective.showView(Perspective.jav a:1465)
>
>>> at
>>>
>
> org.eclipse.ui.internal.WorkbenchPage.busyShowView(Workbench Page.java:655)
>
>>> at
>>> org.eclipse.ui.internal.WorkbenchPage.access$9(WorkbenchPage .java:634)
>>> at
>>> org.eclipse.ui.internal.WorkbenchPage$13.run(WorkbenchPage.j ava:2777)
>>> at
>>> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
>>> at
>>> org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:2774)
>>> at
>>> org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage .java:2764)
>>> at
>>> org.eclipse.ui.internal.ShowViewMenu.showOther(ShowViewMenu. java:175)
>>> at
>
> org.eclipse.ui.internal.ShowViewMenu.access$2(ShowViewMenu.j ava:161)
>
>>> at org.eclipse.ui.internal.ShowViewMenu$2.run(ShowViewMenu.java :48)
>>> at org.eclipse.jface.action.Action.runWithEvent(Action.java:842 )
>>> at
>>>
>
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
> ContributionItem.java:456)
>
>>> at
>>>
>
> org.eclipse.jface.action.ActionContributionItem.handleWidget Event(ActionCont
> ributionItem.java:403)
>
>>> at
>>>
>
> org.eclipse.jface.action.ActionContributionItem.access$0(Act ionContributionI
> tem.java:397)
>
>>> at
>>>
>
> org.eclipse.jface.action.ActionContributionItem$ActionListen er.handleEvent(A
> ctionContributionItem.java:72)
>
>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :81)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:923)
>>> at
>
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:1847)
>
>>> at
>
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1639)
>
>>> at
>
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1402)
>
>>> at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
>>> at
>>>
>
> org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.jav
> a:858)
>
>>> at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>>
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39
> )
>
>>> at
>>>
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
> .java:25)
>
>>> at java.lang.reflect.Method.invoke(Method.java:324)
>>> at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
>>> at org.eclipse.core.launcher.Main.run(Main.java:747)
>>> at org.eclipse.core.launcher.Main.main(Main.java:583)
>>>Caused by: java.lang.StackOverflowError
>>>
>
>
>
Previous Topic:Plug-in with AspectJ (PDE Development) - How do I run AspectJ Instrumented Plugin ?
Next Topic:Aspect Visualizer Failure
Goto Forum:
  


Current Time: Thu Apr 18 14:55:21 GMT 2024

Powered by FUDForum. Page generated in 0.01953 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top