You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2024/02/17 08:07:00 UTC

[jira] [Commented] (CAMEL-20430) camel-cxf-transport is missing OSGi Import Package causing CNF errors for CxfHeaderHelper

    [ https://issues.apache.org/jira/browse/CAMEL-20430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17818131#comment-17818131 ] 

Claus Ibsen commented on CAMEL-20430:
-------------------------------------

You are welcome to work on a patch and send a PR against the 3.22.x branch for camel-karaf

> camel-cxf-transport is missing OSGi Import Package causing CNF errors for CxfHeaderHelper
> -----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-20430
>                 URL: https://issues.apache.org/jira/browse/CAMEL-20430
>             Project: Camel
>          Issue Type: Bug
>          Components: came-cxf
>    Affects Versions: 3.22.1
>         Environment: Found in Camel 3.22.1, Karaf 4.4.4, Eclipse Java 17, Windows but looks likely to affect 3.18.x and any OSGi environment on any supported platform.
>            Reporter: Paul McCulloch
>            Priority: Minor
>
> 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
>  
> <bundle>mvn:org.apache.camel/camel-cxf-transport/3.22.1</bundle>
>  
> with
>  
> <bundle>wrap:mvn:org.apache.camel/camel-cxf-transport/3.22.1/$DynamicImport-Package=org.apache.camel.component.cxf.common.header&amp;Bundle-SymbolicName=org.apache.camel.camel-cxf-transport-patched&amp;overwrite=merge</bundle>



--
This message was sent by Atlassian Jira
(v8.20.10#820010)