Why you need use provided scope?
I think the problem comes from that when you use provided scope, maven-bundle-plugin can't generate correct OSGi metadata header, most likely miss some important Import-Package.
You can compare the OSGi metadata header of your customer bundle between use "compile" and "provided"
Do you use FAB to install your application or regular OSGi bundle?
I compared the headers of both bundles using osgi:headers, then copied the imports from the working bundle (with scope compile) to the one with scope provided. Still same error.
Then I set the version explicitly to 2.9.0.fuse-70-097.
I further added this import:
osgi:headers lists it in white and not red, so I guess it is resolved fine. But I still get the same error when I start the bundle.
@davsclaus: to get started, I am packaging as bundle. Once I get that working, I plan to change that to jar and use FAB deployment.
I am now deploying as FAB. I get same error as with bundle, that is: "No component found with scheme: hazelcast"
With FAB I get that error even if I set the scope of camel-core and camel-hazelcast to compile and use this extra manifest entry:
I thought this should force Fuse ESB to compile any artifacts from org.apache.camel except camel-blueprint. Anyway, I set scope to compile for testing only, I need scope provided in the long run.
Ideally, it should work with default manifest headers:
I tried even manually deploying hazelcast-220.127.116.11.jar, camel-core-2.9.0.jar and camel-hazelcast-2.9.0.jar. osgi:list shows them all active, then I install and start my own bundle and same as before, I get "No component found with scheme: hazelcast"
Edit: Since there is camel-hazelcast feature included with Fuse ESB and I can install it with:
It installs hazelcast and camel-hazelcast. I wonder, is there an example on using this feature? If I am not mistaken, this feature is intended to be used by projects that have camel-hazelcast scope set as provided.
Edit2: It seems camel-hazelcast bundle is the problematic one. If I package my project as bundle, it works if camel-hazelcast scope is compile. The other two (camel-core and hazelcast) can be provided, i.e., I can set camel-core to provided and set Embed-Transitive to false. The hazelcast 18.104.22.168 bundle from Fuse ESB is used. camel-hazelcast 2.9.0.fuse-70-097 still has to be compiled, although it is an active bundle in Fuse ESB, just like hazelcast bundle.
Edited by: ymy54 on Dec 4, 2012 1:57 PM
Some more diagnostics for the case of FAB deployment where the scope of camel-hazelcast is set to compile, but despite this I get "No component found with scheme: hazelcast"
Attached is the output of:
As I suspected, camel-hazelcast does not get compiled (it is not listed under Non-shared dependencies by fab:info, see the attached file), although its scope is compile and <FAB-Provided-Dependency> is:
Edit: I tried with the new Fuse ESB 7.1.0 that has just been released and it works OK, hazelcast is found successfully. Thanks!
Edited by: ymy54 on Dec 24, 2012 11:44 AM
tree-info-headers.txt 3.6 KB
Thanks for sharing your solution.