It looks like you are not using the equinox launcher
(org.eclipse.equinox.launcher jar) to launch the framework.  In a "normal"
eclipse launch the equinox launcher is responsible for finding the
framework and reading the osgi.framework.extensions property and setting up
the class loader for the framework.  This includes putting any framework
extension jars specified by the osgi.framework.extensions property setting.
If you placing the org.eclipse.osgi jar directly on the classpath yourself
to launch the framework externally then you will also have to place your
framework extension jar on the classpath as well.  Otherwise it will not be
found by the framework.

HTH.

Tom




|------------>
| From:      |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |Olle Mårtensson <[email protected]>                                           
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |[email protected]                                                      
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |04/09/2011 04:17 AM                                                          
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |[equinox-dev] framework adaptor hooks not detected                           
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|





I run an embedded equinox 3.6.2 container and I want to make use of
framework adaptor hooks.
I am however unable to get it working properly. Here is what I have done:

I have created a fragment bundle with the following structure:
.
|-- se
|   `-- nordicit
|       `-- osgi
|           `-- platformclassloading
|               |-- HelloHook.class
|               |-- HookConfiguratorImpl.class
|               `-- PlatformClassloadingHook.class
|-- hookconfigurators.properties
`-- META-INF
    `-- MANIFEST.MF

I have the following fragment host manifest entry ( I have tried 3.6.2 and
no version as well ):
Fragment-Host: org.eclipse.osgi;bundle-version="3.4.0"

And the following hookconfigurators.properties entries:
hook.configurators=se.nordicit.osgi.platformclassloading.HookConfiguratorImpl


Both the HelloHook and PlatformClassloadingHook is registerred in the
hookregistry from HookConfiguratorImpl.

The HelloHook just prints out a trace message to see if we are up and
running.

I have packaged this into a jar file
se.nordicit.osgi.platformclassloading_1.0.0.jar which is located in the
same directory as org.eclipse.osgi_3.6.2.R36x_v20110210.jar. I have also
tried with an exploded structure which was then named
se.nordicit.osgi.platformclassloading_1.0.0.

I run the framework with this runtime option
-Dosgi.framework.extensions=se.nordicit.osgi.platformclassloading( I've
tried with and without versioning and also with file: prefix ). I know that
the framework is able to use runtime properties because I have also
-Dosgi.console and -Dosgi.bundles which are working properly.

The adaptor hooks does not seem to be registered properly because there is
no trace of the fragment bundle when doing ss in the console and no trace
message is printed either.

I trying to build a bridge between a legacy system and osgi so equinox is
bootstrapped and embedded into this system. We are starting an external
process with equinox on the classpath lying in an library folder, it's not
a "normal" eclipse application layout of the system. Everything is working
just fine, it's just that I cant get this adaptor hooks thing up and
running.

Thanks! // Olle Mårtensson

_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to