Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] AspectJ/AJDT in Eclipse-Plugin-Projects - where's my mistake?


Hi Jens,

I am using AJDT 3.0 RC2 with a development build of AJDT 1.1.11 from out of CVS and cannot get a failure in the way you describe using the trace aspect you included in your original note. There is a change in AJDT 1.1.11 (due for release any day now) that should make plug-in development somewhat easier (see bugzilla defect 62625 https://bugs.eclipse.org/bugs/show_bug.cgi?id=62625) as it brings in the org.eclipse.ajde plug-in as a runtime dependency for you automatically upon giving your project an AspectJ nature.

Some more useful information might be found if you examine one of the other entries in the Error View. I noticed just a few minutes ago - in the middle of writing this response - that if I inadvertently created a situation where the trace aspect tried to advise itself (it's late here) and got into a loop, then a similar failure to what you describe occurred. However it wasn't until I examined the Error View entry for "An error occurred while automatically activating bundle MyPlugin (91) " that I found any information about the java.lang.StackOverflowError that was at the root. Is there a similar "root exception" that perhaps you have not found yet ?

Best regards,
George
________________________________________
George C. Harley



Jens Birger Hahn <8hahn@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sent by: aspectj-users-admin@xxxxxxxxxxx

30/06/2004 21:17

Please respond to
aspectj-users

To
aspectj-users@xxxxxxxxxxx
cc
Subject
[aspectj-users] AspectJ/AJDT in Eclipse-Plugin-Projects - where's my mistake?





Hello, I am developing an Eclipse-Plugin and I want to use AspectJ for
some "aspects". There seems to be a problem doing this the simple way. I
tried the following (Latest Stable Eclipse 3.0.0/AJDT ):

1. Create a Plugin-Project using the wizard
2. Select the "Hello, World"-Template
2.1 Run (Runtime Workbench) => Works
3. Right-click on project and choose "Convert to AJDT Project"
3.1 Run => Works
4. Add a simple aspect to the main package, sth. like that:

package aj_hello_plug;


public aspect TraceAspect {

                 pointcut staticCalls()
                                  : call(* Aj_hello_plugPlugin.*(..));

                 before() : staticCalls() {
                                  System.out.println("Call to " + thisJoinPoint);
                 }
}

4.1 Run => Does not work (Error log see below)

What a I missing? I tried some more things like adding the rt-jar to
classpath and so on but it just won't work. Any help is appreciated. It
would be very nice to have AspectJ at hand while developing plug-ins.

Regards,
Jens


Error-Log:

Error Jun 30, 2004 22:30:27.618 Plug-in aj_hello_plug was unable to load
class aj_hello_plug.actions.SampleAction.
java.lang.ClassNotFoundException: aj_hello_plug.actions.SampleAction
                 at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:404)
                 at [...]

Error Jun 30, 2004 22:30:27.618 Could not create action delegate for id:
aj_hello_plug.actions.SampleAction

Error Jun 30, 2004 22:30:27.597 Plug-in aj_hello_plug was unable to load
class aj_hello_plug.actions.SampleAction.

? 2004 22:30:27.587 An error occured while automatically activating bundle
aj_hello_plug (91).
org.osgi.framework.BundleException: The activator
aj_hello_plug.Aj_hello_plugPlugin for bundle aj_hello_plug is invalid
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:158)


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


Back to the top