I'm using equinox weaving to do aspect across OSGi bundles.My server is Virgo tomcat. Below exception occured when i start my plan:
Unable to satisfy dependencies of bundle 'org.eclipse.equinox.weaving.aspectj' at version '1.0.0.v20100503': Cannot resolve: org.eclipse.equinox.weaving.aspectj Resolver report: An Import-Package could not be resolved. Caused by missing constraint in bundle <org.eclipse.equinox.weaving.aspectj_1.0.0.v20100503> constraint: <Import-Package: org.eclipse.equinox.service.weaving; version="0.0.0">
The most likely cause is that your config.ini is not set up properly to load the org.eclipse.equinox.weaving.hook fragment. Try this. Start up with an osgi prompt (use the -console option) and type 'ss'. This will list your bundles and fradments. Do you see the hook fragment? If not, then it is not being loaded properly and you should fix your config.ini. If it is, then something else is the matter.
1. I don't see any osgi.framework.extensions entry. This is required in order for equinox to know about framework adapters.
2. Things may be different since you're using virgo. You may need to load framework adapters differently.
I've start org.eclipse.equinox.weaving.hook and org.eclipse.equinox.weaving.aspectj successfully by putting jars into virgo\plugins and modifying virgo\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info. Bundles' state list below
id State Bundle
0 ACTIVE org.eclipse.osgi_3.8.1.v20120830-144521
1 RESOLVED org.eclipse.virgo.kernel.equinox.extensions_3.6.2.RELEASE
2 RESOLVED org.eclipse.equinox.weaving.hook_1.0.200.I20130319-1000
3 ACTIVE org.eclipse.equinox.weaving.aspectj_1.0.300.I20130319-1000
66 RESOLVED org.aspectj.weaver_220.127.116.1130613144500-a
67 RESOLVED org.aspectj.runtime_18.104.22.16830613144500-a
I'm sure my aspect bundle started erlier than target bundle. But aspect doesn't work