I use the following bundles:
org.aspectj.runtime_1.6.1.20080703120000
org.aspectj.weaver_1.6.1.20080703120000
org.eclipse.equinox.weaving.aspectj_1.0.0.200809192119.jar
org.eclipse.equinox.weaving.demo.hello
org.eclipse.equinox.weaving.demo.hello.aspects
org.eclipse.equinox.weaving.hook_1.0.0.200809192119.jar
org.eclipse.osgi_3.4.0.v20080605-1900.jar
my config.ini file in the configuration directory looks like the
following:
org.aspectj.weaver.showWeaveInfo=true
osgi.framework.extensions=org.eclipse.equinox.weaving.hook
osgi.bundles=org.aspectj.runtime_1.6.1.20080703120000,
org.aspectj.weaver_1.6.1.20080703120000,
org.eclipse.equinox.weaving.aspectj_1.0.0.200809192119.jar, org.
eclipse.equinox.weaving.hook_1.0.0.200809192119.jar,
org.eclipse.equinox.weaving
.demo.hello, org.eclipse.equinox.weaving.demo.hello.aspects
After starting the the osgi app:
java -jar org.eclipse.osgi_3.4.0.v20080605-1900.jar -console
I cann see all the installed bundles:
Framework is launched.
id State Bundle
0 ACTIVE org.eclipse.osgi_3.4.0.v20080605-1900
Fragments=1
1 RESOLVED org.eclipse.equinox.weaving.hook_1.0.0.200809192119
Master=0
2 RESOLVED org.aspectj.runtime_1.6.1.20080703120000
3 RESOLVED org.aspectj.weaver_1.6.1.20080703120000
4 <<LAZY>> org.eclipse.equinox.weaving.aspectj_1.0.0.200809192119
5 RESOLVED org.eclipse.equinox.weaving.demo.hello_1.0.0
6 RESOLVED org.eclipse.equinox.weaving.demo.hello.aspects_1.0.0
and I try to start the bundle 4 in order to get the weaving working,
but
then I get the following exception: (see on the bottom)
Ok it seems like the hook bunde can not be found or at least the
classes
(IWeavingService) cannot be found. But the hook is shown as bundle 1
(see above).
Maybe someone of the Equinox Aspect team has an idea what I do wrong
and
can help me to run Equinox Aspects on the command line...
org.osgi.framework.BundleException: Exception in
org.eclipse.equinox.weaving.aspectj.WeavingServicePlugin.start() of
bundle org.eclipse.equinox.weaving.aspectj.
at
org
.eclipse
.osgi
.framework
.internal
.core.BundleContextImpl.startActivator(BundleContextImpl.java:1028)
at
org
.eclipse
.osgi
.framework
.internal.core.BundleContextImpl.start(BundleContextImpl.java:984)
at
org
.eclipse
.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:
346)
at
org
.eclipse
.osgi
.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)
at
org
.eclipse
.osgi
.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257)
at
org
.eclipse
.osgi
.framework
.internal
.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:
257)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun
.reflect
.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun
.reflect
.DelegatingMethodAccessorImpl
.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org
.eclipse
.osgi
.framework
.internal
.core
.FrameworkCommandInterpreter
.execute(FrameworkCommandInterpreter.java:150)
at
org
.eclipse
.osgi
.framework
.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:302)
at
org
.eclipse
.osgi
.framework
.internal.core.FrameworkConsole.console(FrameworkConsole.java:287)
at
org
.eclipse
.osgi
.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:
223)
at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.NoClassDefFoundError:
org.eclipse.equinox.service.weaving.IWeavingService
at
org
.eclipse
.equinox
.weaving
.aspectj.WeavingServicePlugin.start(WeavingServicePlugin.java:71)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl
$2.run(BundleContextImpl.java:1009)
at java.security.AccessController.doPrivileged(Native Method)
at
org
.eclipse
.osgi
.framework
.internal
.core.BundleContextImpl.startActivator(BundleContextImpl.java:1003)
... 14 more
Nested Exception:
java.lang.NoClassDefFoundError:
org.eclipse.equinox.service.weaving.IWeavingService
at
org
.eclipse
.equinox
.weaving
.aspectj.WeavingServicePlugin.start(WeavingServicePlugin.java:71)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl
$2.run(BundleContextImpl.java:1009)
at java.security.AccessController.doPrivileged(Native Method)
at
org
.eclipse
.osgi
.framework
.internal
.core.BundleContextImpl.startActivator(BundleContextImpl.java:1003)
at
org
.eclipse
.osgi
.framework
.internal.core.BundleContextImpl.start(BundleContextImpl.java:984)
at
org
.eclipse
.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:
346)
at
org
.eclipse
.osgi
.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)
at
org
.eclipse
.osgi
.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257)
at
org
.eclipse
.osgi
.framework
.internal
.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:
257)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun
.reflect
.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun
.reflect
.DelegatingMethodAccessorImpl
.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org
.eclipse
.osgi
.framework
.internal
.core
.FrameworkCommandInterpreter
.execute(FrameworkCommandInterpreter.java:150)
at
org
.eclipse
.osgi
.framework
.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:302)
at
org
.eclipse
.osgi
.framework
.internal.core.FrameworkConsole.console(FrameworkConsole.java:287)
at
org
.eclipse
.osgi
.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:
223)
at java.lang.Thread.run(Thread.java:636)
Nested Exception:
java.lang.NoClassDefFoundError:
org.eclipse.equinox.service.weaving.IWeavingService
at
org
.eclipse
.equinox
.weaving
.aspectj.WeavingServicePlugin.start(WeavingServicePlugin.java:71)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl
$2.run(BundleContextImpl.java:1009)
at java.security.AccessController.doPrivileged(Native Method)
at
org
.eclipse
.osgi
.framework
.internal
.core.BundleContextImpl.startActivator(BundleContextImpl.java:1003)
at
org
.eclipse
.osgi
.framework
.internal.core.BundleContextImpl.start(BundleContextImpl.java:984)
at
org
.eclipse
.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:
346)
at
org
.eclipse
.osgi
.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)
at
org
.eclipse
.osgi
.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257)
at
org
.eclipse
.osgi
.framework
.internal
.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:
257)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun
.reflect
.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun
.reflect
.DelegatingMethodAccessorImpl
.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org
.eclipse
.osgi
.framework
.internal
.core
.FrameworkCommandInterpreter
.execute(FrameworkCommandInterpreter.java:150)
at
org
.eclipse
.osgi
.framework
.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:302)
at
org
.eclipse
.osgi
.framework
.internal.core.FrameworkConsole.console(FrameworkConsole.java:287)
at
org
.eclipse
.osgi
.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:
223)
at java.lang.Thread.run(Thread.java:636)
osgi>
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev