StackOverflowError occurs with sample cxf rest endpoint with OpenApi V3 on karaf environment

Solution Verified - Updated -

Issue

Although the official document guides about the cxf rest endpoint with OpenApi V3 on karaf environment, it does not work as expected.
"Apache CXF Development Guide":"Enabling OpenAPI": "CHAPTER 54. EXTENDING JAX-RS ENDPOINTS WITH OPENAPI SUPPORT": 54.2. Karaf Implementations

By access to "http://localhost:8181/cxf/crm/openapi.json" , then stackoverflow is observed in fuse.log

2020-11-20 13:50:34,784 | WARN  | XNIO-2 task-3        | o.a.c.p.PhaseInterceptorChain    | 83 - org.apache.cxf.cxf-core - 3.2.7.fuse-770017-redhat-00001 | Application {http://rest.cxf.quickstarts.fuse.jboss.org/}CustomerService has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: null
    at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162) ~[!/:3.2.7.fuse-770017-redhat-00001]
    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128) ~[!/:3.2.7.fuse-770017-redhat-00001]
    at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:193) ~[!/:3.2.7.fuse-770017-redhat-00001]
    at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:103) ~[!/:3.2.7.fuse-770017-redhat-00001]
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59) ~[!/:3.2.7.fuse-770017-redhat-00001]
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96) ~[!/:3.2.7.fuse-770017-redhat-00001]
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[!/:3.2.7.fuse-770017-redhat-00001]
    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) ~[!/:3.2.7.fuse-770017-redhat-00001]
    at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267) ~[!/:3.2.7.fuse-770017-redhat-00001]
    at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) ~[!/:3.2.7.fuse-770017-redhat-00001]
    at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) ~[!/:3.2.7.fuse-770017-redhat-00001]
    at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) ~[!/:3.2.7.fuse-770017-redhat-00001]
    at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:216) ~[!/:3.2.7.fuse-770017-redhat-00001]
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301) ~[!/:3.2.7.fuse-770017-redhat-00001]
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:225) ~[!/:3.2.7.fuse-770017-redhat-00001]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:645) ~[!/:4.0.1]
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:276) ~[!/:3.2.7.fuse-770017-redhat-00001]
    at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) ~[!/:2.0.30.SP1-redhat-00001]
    at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) ~[!/:2.0.30.SP1-redhat-00001]
    at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68) ~[!/:2.0.30.SP1-redhat-00001]
    at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) ~[!/:2.0.30.SP1-redhat-00001]
    at org.ops4j.pax.web.service.undertow.internal.Context$1.lambda$wrap$0(Context.java:615) ~[?:?]
    at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68) [!/:2.0.30.SP1-redhat-00001]
    at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132) [!/:2.0.30.SP1-redhat-00001]
    at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [!/:2.0.30.SP1-redhat-00001]
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [!/:2.0.30.SP1-redhat-00001]
    at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [!/:2.0.30.SP1-redhat-00001]
    at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [!/:2.0.30.SP1-redhat-00001]
    at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) [!/:2.0.30.SP1-redhat-00001]
    at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) [!/:2.0.30.SP1-redhat-00001]
    at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) [!/:2.0.30.SP1-redhat-00001]
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [!/:2.0.30.SP1-redhat-00001]
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [!/:2.0.30.SP1-redhat-00001]
    at io.undertow.servlet.handlers.SessionRestoringHandler.handleRequest(SessionRestoringHandler.java:119) [!/:2.0.30.SP1-redhat-00001]
    at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:269) [!/:2.0.30.SP1-redhat-00001]
    at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:78) [!/:2.0.30.SP1-redhat-00001]
    at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:133) [!/:2.0.30.SP1-redhat-00001]
    at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:130) [!/:2.0.30.SP1-redhat-00001]
    at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) [!/:2.0.30.SP1-redhat-00001]
    at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) [!/:2.0.30.SP1-redhat-00001]
    at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249) [!/:2.0.30.SP1-redhat-00001]
    at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:78) [!/:2.0.30.SP1-redhat-00001]
    at io.undertow.servlet.handlers.ServletInit

Environment

  • Red Hat Fuse
    • 7.7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content