Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osgi - camel-cxf-transport is missing OSGi Import Package causing CNF errors for CxfHeaderHelper #566

Open
paul-mcculloch opened this issue Jan 10, 2025 · 1 comment

Comments

@paul-mcculloch
Copy link

[Originally logged as https://issues.apache.org/jira/browse/CAMEL-20430 but closed with instructions to log here]

o.a.c.c.cxf.transport.message.CxfMessageHelper.getCxfInMessage() references o.a.c.c.cxf.common.header.CxfHeaderHelper but the manifest doesn't import this package.

This triggers "java.lang.ClassNotFoundException: org.apache.camel.component.cxf.common.header.CxfHeaderHelper not found by org.apache.camel.camel-cxf-transport"

This looks to have ben caused by the split of camel-cxf into multiple packages in 3.18.

I think the issue is in the camel-cxf-transport pom .xml which includes:
<camel.osgi.import>
!org.apache.camel.component.cxf.*,

i.e. explicitly excludes the parent package of CxfHeaderHelper

This can be worked around, in Karaf at least, by using the 'wrap' feature to modify the Manifest on the fly. I am using a hacked version of the camel-cxf feature which replaces

mvn:org.apache.camel/camel-cxf-transport/3.22.1

with

wrap:mvn:org.apache.camel/camel-cxf-transport/3.22.1/$DynamicImport-Package=org.apache.camel.component.cxf.common.header&Bundle-SymbolicName=org.apache.camel.camel-cxf-transport-patched&overwrite=merge

@essobedo
Copy link
Contributor

Feel free to propose a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants