You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Jacek Szymański (Jira)" <ji...@apache.org> on 2022/09/27 18:52:00 UTC

[jira] [Created] (CAMEL-18563) ClassNotDefFoundError when an exception thrown from a cxfrs route

Jacek Szymański created CAMEL-18563:
---------------------------------------

             Summary: ClassNotDefFoundError when an exception thrown from a cxfrs route
                 Key: CAMEL-18563
                 URL: https://issues.apache.org/jira/browse/CAMEL-18563
             Project: Camel
          Issue Type: Bug
          Components: came-cxf, camel-karaf
    Affects Versions: 3.18.2
            Reporter: Jacek Szymański


When a route started from a cxf:rsServer service throws an exception, an additional exception from Camel is thrown:

{{2022-09-27T20:37:53,371 | WARN  | qtp1368588965-512 | HttpChannel                      | 184 - org.eclipse.jetty.util - 9.4.48.v20}}
{{220622 | /cxf/abc/xxx}}
{{java.lang.NoClassDefFoundError: org/apache/camel/component/cxf/util/CxfUtils}}
{{        at org.apache.camel.component.cxf.jaxrs.CxfRsConsumer.lambda$createServer$0(CxfRsConsumer.java:65) ~[?:?]}}
{{        at org.apache.cxf.phase.PhaseInterceptorChain.wrapExceptionAsFault(PhaseInterceptorChain.java:373) ~[?:?]}}

{{[...]}}

{{Caused by: java.lang.ClassNotFoundException: org.apache.camel.component.cxf.util.CxfUtils not found by org.apache.camel.camel-cxf-rest [90]
        ... 46 more}}

 

CxfUtils is used by CxfRsConsumer.java on line 65, but in pom.xml the package is explicitly excluded from imports.

 

I have put a demo code on [https://github.com/jacekszymanski/cxfrstest]

to reproduce behavior load into camel-karaf, start and access /cxf/abc/anything with POST.

As a workaround I removed exclusion and added explicit import instead, this sort of fixed it.



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