[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] Problems starting Equinox Aspects on the command line
- From: Martin Lippert <lippert@xxxxxxx>
- Date: Mon, 13 Oct 2008 22:26:46 +0200
- Delivered-to: email@example.com
- User-agent: Thunderbird 22.214.171.124 (Windows/20080914)
I think I have solved your issue. If you start equinox aspects from the
command line you need to add the o.e.e.weaving.hook bundle jar to the
classpath of the JVM when starting osgi. Otherwise the equinox aspects
framework extension cannot be configured during startup.
There is another thing you need to take care of: set the system property
osgi.compatibility.bootdelegation=true to let the weaving service find
the xml parsers from the JDK. Equinox operates at a more strict mode
when started from command line.
My config.ini file looks like this:
# Equinox Aspects
My command line looks like this:
java -Dosgi.compatibility.bootdelegation=true -cp
Thorsten Harbig wrote:
Hello Mr Lippert,
would it be possible to get a ready to go example of aspects equinox for
the command line? Similar to the one from the EquinoxAspects page for
Becuase I was not able to start it from the command line. I thought it
shouldn't be any difference whether we start it from within eclipse or
Actually I downloaded already the target runtime, so I would only need an
adjusted config.ini plus the command line instructions to start the osgi
What happens if you start the aspectj weaving service bundle directly at
start level 1 from the config.ini? Does it make any difference or do you
get the same ClassNotFoundException?
Looking at this I have got one question: Are the system bundle
(org.eclipse.osgi) and the framework extension fragment
(org.eclipse.equinox.weaving.hook) colocated, i.e. in the same
directory? That is neccessary for Equinox to recognize the framework
extension (see http://wiki.eclipse.org/index.php/Adaptor_Hooks for
details) => Equinox Aspects will not work if the both bundles are not
Yes, I have all bundles within the same directory.
- org.eclipse.equinox.weaving.aspectj_126.96.36.199808061839.jar (file)
- org.eclipse.equinox.weaving.hook_188.8.131.52808061839.jar (file)
- org.eclipse.osgi_3.4.0.v20080605-1900.jar (file)
- org.aspectj.weaver_184.108.40.20680703120000 (dir)
- org.aspectj.runtime_220.127.116.1180703120000 (dir)
(like it is delivered with the equinox-aspects-demo-hello.zip)
Additionally I copied the two exported bundles
into the same directory.
Than I created a configuration directory where I added the config.ini
the necessary bundles and the hook information
now I start it from the command line in the directory where all the
bundles are located.
Actually the org.eclipse.equinox.weaving.demo.hello just works fine for
me, but without the augmentation through the aspect of course.
equinox-dev mailing list
equinox-dev mailing list