-
1. Re: Camel: Failed to resolve endpoint: hazelcast
ffang Nov 27, 2012 7:55 PM (in response to fivcsw)Hi,
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"
Freeman
-
2. Re: Camel: Failed to resolve endpoint: hazelcast
davsclaus Nov 28, 2012 2:48 AM (in response to fivcsw)Do you use FAB to install your application or regular OSGi bundle?
-
3. Re: Camel: Failed to resolve endpoint: hazelcast
fivcsw Nov 30, 2012 5:04 AM (in response to ffang)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:
org.apache.camel.component.hazelcast;resolution:=optional;version="2.9.0.fuse-70-097"
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.
-
4. Re: Camel: Failed to resolve endpoint: hazelcast
fivcsw Dec 4, 2012 9:07 AM (in response to davsclaus)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:
<FAB-Provided-Dependency>
org.apache.camel:camel-blueprint
org.apache.cxf:*
org.apache.activemq:*
</FAB-Provided-Dependency>
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:
<FAB-Provided-Dependency>
org.apache.camel:*
org.apache.cxf:*
org.apache.activemq:*
</FAB-Provided-Dependency>
I tried even manually deploying hazelcast-1.9.4.4.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:
features:install camel-hazelcast
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 1.9.4.6 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
-
5. Re: Camel: Failed to resolve endpoint: hazelcast
fivcsw Dec 24, 2012 6:48 AM (in response to fivcsw)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:
fab:tree
fab:info
fab:headers
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:
org.apache.camel:camel-blueprint
org.apache.camel:camel-core
org.apache.camel:camel-test
activemq org.apache.cxf:*
org.apache.activemq:*
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
-
6. Re: Camel: Failed to resolve endpoint: hazelcast
davsclaus Dec 26, 2012 3:59 AM (in response to fivcsw)Thanks for sharing your solution.