[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ajdt-dev] Launching eclipse application
|
Hi Romain!
Great to hear that you got it working!!!
Cheers,
-Martin
On 03.11.09 10:54, Romain wrote:
Hi again,
adding : osgi.framework.extensions=org.eclipse.equinox.weaving.hook
in config.ini did the trick!
I don't know why
-Dosgi.framework.extensions=org.eclipse.equinox.weaving.hook has not
been taken into account.
Cheers,
Romain
Le mardi 03 novembre 2009 à 10:12 +0100, Romain a écrit :
Hi Martin,
with the additional debug info it seems, that the hook is not taken into
acount :
using the native launcher :
reuillon@polux:~/tmp/testAspect/eclipse$ ./eclipse
[org.eclipse.equinox.weaving.hook] info adding AspectJ hooks ...
[org.eclipse.equinox.weaving.aspectj] info Starting AspectJ weaving service ...
[org.aspectj.osgi.service.caching] info starting standard caching service ...
[org.aspectj.osgi.service.caching] Created and registered SingletonCachingService.
[org.aspectj.osgi.service.caching.j9] warning cannot start J9 caching service
[aspect.import] info AspectJ Weaver Version 1.6.5 built on Thursday Jun 18, 2009 at 03:42:32 GMT
[aspect.import] info register aspect export.TestAspect
[org.eclipse.equinox.weaving.aspectj] info weaving bundle 'aspect.import'
[aspect.import] weaveinfo Join point 'method-execution(void imported.Application.stop())' in Type 'imported.Application' (Application.java:19) advised by before advice from 'export.TestAspect' (TestAspect.aj:5)
Application started.
[aspect.import] weaveinfo Join point 'method-execution(void imported.TestClass.method())' in Type 'imported.TestClass' (TestClass.java:4) advised by before advice from 'export.TestAspect' (TestAspect.aj:5)
Hello from AspectJ
Method call.
[org.aspectj.osgi.service.caching] Shut down and unregistered SingletonCachingService.
reuillon@polux:~/tmp/testAspect/eclipse$
using java -jar plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar -vmargs -Dosgi.framework.extensions=org.eclipse.equinox.weaving.hook
reuillon@polux:~/tmp/testAspect/eclipse$ java -jar plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar -vmargs -Dosgi.framework.extensions=org.eclipse.equinox.weaving.hook
[org.eclipse.equinox.weaving.aspectj] info Starting AspectJ weaving service ...
[org.aspectj.osgi.service.caching] info starting standard caching service ...
[org.aspectj.osgi.service.caching] Created and registered SingletonCachingService.
[org.aspectj.osgi.service.caching.j9] warning cannot start J9 caching service
Application started.
Method call.
[org.aspectj.osgi.service.caching] Shut down and unregistered SingletonCachingService.
reuillon@polux:~/tmp/testAspect/eclipse$
Any idea how I can enable the hook using "java -jar"?
Cheers,
Romain
Le lundi 02 novembre 2009 à 22:10 +0100, Martin Lippert a écrit :
Hi!
Andrews suggestion sounds good: Please enable the additional debug info
and we will see more about what could possibly be wrong here.
And can you tell us more about how you launch the framework when you
"bypass the native launcher"? Using just "java -jar o.e.osgi"?
Cheers,
-Martin
On 02.11.09 18:59, Andrew Eisenberg wrote:
Another thing you can try is enabling equinox aspects logging inside
of your config.ini by adding the following line:
aj.weaving.verbose=true
org.aspectj.weaver.showWeaveInfo=true
org.aspectj.osgi.verbose=true
This may provide some extra information. You can send the logs here.
If this doesn't work, then I will have to defer you to Martin Lippert,
who is on this list and has much more intimate knowledge of how EA
works. This may be a bug with Equinox Aspects.
On Mon, Nov 2, 2009 at 10:00 AM, Romain<romain.reuillon@xxxxxxxxx> wrote:
Post-scriptum :): if someone want to give it a try
an archive of the eclipse application is available here:
https://public.iscpif.fr/~reuillon/aspectEclipse.tgz
I requires the use of a 32 bits JVM (export PATH).
When launched with ./eclipse the aspect works.
When launched with java -jar
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar -vmargs
-Dosgi.framework.extensions=org.eclipse.equinox.weaving.hook, the aspect
is not working
Cheers,
Rom
Le lundi 02 novembre 2009 à 17:50 +0100, Romain a écrit :
Hi Andrew,
thank you for your answer.
The level is specified in the config.ini:
#Product Runtime Configuration File
eclipse.application=aspect.import.testaspect
osgi.bundles.defaultStartLevel=4
eclipse.product=aspect.import.testaspect
osgi.splashPath=platform:/base/plugins/aspect.import
osgi.bundles=aspect.export,aspect.import,org.aspectj.runtime,org.aspectj.weaver,org.eclipse.core.contenttype,org.eclipse.core.jobs,org.eclipse.core.runtime@start,org.eclipse.core.runtime.compatibility.registry,org.eclipse.equinox.app,org.eclipse.equinox.common@2:start,org.eclipse.equinox.preferences,org.eclipse.equinox.registry,org.eclipse.equinox.weaving.aspectj@4:start,org.eclipse.equinox.weaving.caching@4:start,org.eclipse.equinox.weaving.caching.j9@4:start,org.eclipse.equinox.weaving.hook
To confirm this I verified that the bundle is started using the console:
reuillon@polux:~/tmp/testAspect/eclipse$ java -jar plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar -console -noexit -vmargs -Dosgi.framework.extensions=org.eclipse.equinox.weaving.hook
osgi> [org.aspectj.osgi.service.caching] Created and registered SingletonCachingService.
Application started.
Method call.
osgi> ss
Framework is launched.
id State Bundle
0 ACTIVE org.eclipse.osgi_3.5.1.R35x_v20090827
Fragments=1
1 RESOLVED org.eclipse.equinox.weaving.hook_1.0.0.200905261348
Master=0
2 RESOLVED aspect.export_1.0.0
3 RESOLVED aspect.import_1.0.0
4 ACTIVE org.aspectj.runtime_1.6.5.20090618034232
5 ACTIVE org.aspectj.weaver_1.6.5.20090618034232
6<<LAZY>> org.eclipse.core.contenttype_3.4.1.R35x_v20090826-0451
7 ACTIVE org.eclipse.core.jobs_3.4.100.v20090429-1800
8 ACTIVE org.eclipse.core.runtime_3.5.0.v20090525
9 RESOLVED org.eclipse.core.runtime.compatibility.registry_3.2.200.v20090429-1800
Master=13
10 ACTIVE org.eclipse.equinox.app_1.2.0.v20090520-1800
11 ACTIVE org.eclipse.equinox.common_3.5.1.R35x_v20090807-1100
12 ACTIVE org.eclipse.equinox.preferences_3.2.300.v20090520-1800
13 ACTIVE org.eclipse.equinox.registry_3.4.100.v20090520-1800
Fragments=9
14 ACTIVE org.eclipse.equinox.weaving.aspectj_1.0.0.200906171200
15 ACTIVE org.eclipse.equinox.weaving.caching_1.0.0.200807082136
16 ACTIVE org.eclipse.equinox.weaving.caching.j9_1.0.0.200807082136
osgi>
Cheers,
Romain
Le lundi 02 novembre 2009 à 09:24 -0700, Andrew Eisenberg a écrit :
My guess is that the start level of 2 for
org.eclipse.equinox.weaving.aspectj is not being recognized. Is the
start level explicit in the config.ini?
You can confirm this by starting eclipse in console mode (use the
-console command line argument). And check to see if the
org.eclipse.equinox.weaving.aspectj is started:
osgi> ss org.eclipse.equinox.weaving.aspectj
See here for more information:
http://www.eclipse.org/equinox/incubator/aspects/equinox-aspects-quick-start.php
Let me know if this solves your problem.
On Mon, Nov 2, 2009 at 7:47 AM, Romain<romain.reuillon@xxxxxxxxx> wrote:
Hi all,
we are trying to launch an eclipse application containing aspects. When
we launch it using the native launcher everything is fine and the aspect
is taken into account:
--------------------------------------------------------------
reuillon@polux:~/tmp/testAspect/eclipse$ ./eclipse
[org.aspectj.osgi.service.caching] Created and registered
SingletonCachingService.
Application started.
Hello from AspectJ
Method call.
[org.aspectj.osgi.service.caching] Shut down and unregistered
SingletonCachingService.
reuillon@polux:~/tmp/testAspect/eclipse$
--------------------------------------------------------------
But when we bypass the native launcher the aspect is not used:
--------------------------------------------------------------
reuillon@polux:~/tmp/testAspect/eclipse$ java -jar
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar -vmargs
-Dosgi.framework.extensions=org.eclipse.equinox.weaving.hook
[org.aspectj.osgi.service.caching] Created and registered
SingletonCachingService.
Application started.
Method call.
[org.aspectj.osgi.service.caching] Shut down and unregistered
SingletonCachingService.
reuillon@polux:~/tmp/testAspect/eclipse$
--------------------------------------------------------------
Do you have any idea how we may bypass the native launcher and make the
aspects work ?
Cheers,
Romain
_______________________________________________
ajdt-dev mailing list
ajdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ajdt-dev
_______________________________________________
ajdt-dev mailing list
ajdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ajdt-dev
_______________________________________________
ajdt-dev mailing list
ajdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ajdt-dev
_______________________________________________
ajdt-dev mailing list
ajdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ajdt-dev
_______________________________________________
ajdt-dev mailing list
ajdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ajdt-dev