Eclipse product export: fragment error (Host plugin not found)

382 Views Asked by At

I have a workspace in Eclipse RCP 3.8.2 IDE with 3 plugins and 2 fragments:

  • P1 and P2 plugins
  • BONECP1 fragment (P1 is the HOST)
  • BONECP2 fragment (P2 is the HOST)
  • MAIN plugin (requires P1 and P2)

Life goes well running MAIN plugin inside the IDE... but when exporting MAIN plugin (as an Eclipse RCP Product), fragment BONECP2 causes this error:

sample image

Any ideas? Tips:

  1. The fragments are CLONES (classpath libs are the SAME!)
  2. Sometimes (if some config is changed in BONECP1 fragment) BONECP2 fragment cannot find some classes that are loaded and present in the HOST. Reconfiguring BONECP1 fragment (making it not singleton / singleton again) resolves the issue!!
  3. If the operation that caused the error is tried again, then the classes not found previously are found! (exported version and inside the IDE)
  4. Removing the HOST MINIMUM VERSION of BONECP2 fragment resolves the EXPORT error... but then BONECP2 fragment cannot find some classes that are loaded and present in the HOST!

Something is missing in my understanding of fragments? Why is eclipse OK with this configuration inside the IDE and not at export time?

Here is the MANIFEST of the BONECP fragments:

Manifest-Version: 1.0
Eclipse-BundleShape: jar
Bundle-ManifestVersion: 2
Bundle-Name: com.jolbox.bonecp
Bundle-SymbolicName: BONECP1;singleton:=true
Bundle-Version: 0.7.0.qualifier
Fragment-Host: P1;bundle-version="1.0.0.qualifier"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: .,
 libraries/bonecp-0.7.0.jar,
 libraries/guava-r08.jar,
 libraries/slf4j-api-1.6.1.jar,
 libraries/slf4j-log4j12-1.6.1.jar
Export-Package: com.jolbox.bonecp
0

There are 0 best solutions below