Hello Vincent,

First, i am french, so i speak a bad english , sorry !

Don't worry, I have a lot of experience in this area... ;-)

Then i got a big problem with Felix!
I have an application which works on Oscar! but if i want to use it in Felix, i got lot of errors :(
I think its a problem of manifest but please help me !!

MANIFEST is :
Manifest-Version: 1.0
Bundle-Name: Bundle Video Client
Bundle-Activator: activator.Activator
Import-Service: demandeVideo.InterfaceTransfertVideo
Bundle-Version: 1.0
DynamicImport-Package: demandeVideo, org.osgi.framework; specification-version=1.1

Definitely, as Niclas said, you want to do "Import-Package: org.osgi.framework..."...

To use on felix, i added
Bundle-ManifestVersion: 2
Bundle-SymbolicName: bundlevideoclient

But i got error :
-> Exception in thread "Thread-3" java.lang.ClassCastException: InterfaceFournisseurVideoImpl.InterfaceTransfertVideoImp
l
at activator.Activator$ThreadSelectionAffichage.run(Activator.java:611)

Thanks for your help ! :)

And also as Niclas said, this is not enough information for me to figure it out.

Typically speaking, the main differences that impact bundles when switch from Oscar to Felix are:

  1. Your bundles must import every external package they use except
     java.* in Felix.
  2. Classes on the class path are no longer automatically accessible
     to the bundles.

Admittedly, these two issues are related.

My guess is that you are falling victim of (2). You probably didn't get your class cast exception under Oscar because your classes were also available on the class path so your bundles were always getting the same definition via the parent class loader. If that were true, then this would no longer be the case under Felix.

Of course, this is just a guess.

Investigate a little more. Make sure that all bundles have contain the packages they should and make sure that all imports and exports are explicit. If you still cannot figure it out, you can email me (privately) a minimal set of bundles to reproduce the issue.

-> richard

Reply via email to