Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Duplicate
-
3.18.2
-
None
-
Unknown
Description
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.
Attachments
Issue Links
- is duplicated by
-
CAMEL-18579 Missing osgi import for CxfUtils in camel-cxf-rest
- Resolved