camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephan Siano (JIRA)" <>
Subject [jira] Created: (CAMEL-3264) Split package issue on OSGi with META-INF.cxf
Date Thu, 21 Oct 2010 13:40:40 GMT
Split package issue on OSGi with META-INF.cxf

                 Key: CAMEL-3264
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-cxf
    Affects Versions: 2.4.0
         Environment: equinox OSGi container
            Reporter: Stephan Siano
            Priority: Minor

When using camel-cxf with <cxf:cxfEndpoint> definitions in sprinf DSL it is necessary
to import resources provided by the CXF bundle as in the camel-example-cxf-proxy example.
This example does not work reliably on all OSGi containers (for me it worked on karaf, but
it did not work on equinox, but I think this is only accidental and an <import resource="classpath:META-INF/cxf/cxf.xml"/>
<import resource="classpath:META-INF/cxf/cxf-extension-camel.xml"/> will never work).

A further analysis showed that both the CXF bundle (as provided from apache) and the camel-cxf
bundle do an export on the META-INF.cxf package. If another bundle (containig the scenario)
imports this package, the resolution is ambigous, so it can be resolved either to the CXF
bundle or to the camel-cxf bundle. In one case the  <import resource="classpath:META-INF/cxf/cxf.xml"/>
 will fail, in the other case it will succeed.

The osgi 4.2 spec has some input about handling split packages in section 3.12, but I think
there should be some change in the camel-cxf manifest.

I could work around the issue by creating a third bundle that has the following lines in it's
Export-Package: META-INF.cxf
Require-Bundle: org.apache.cxf.bundle,org.apache.camel.camel-cxf

This works for me, but it follows the "allowed but confusing" example in section 3.12.3 of
the osgi 4.2 spec, so maybe there is a way to achieve the same thing with only two bundles

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message