[ https://issues.apache.org/jira/browse/CAMEL-21604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-21604: -------------------------------- Fix Version/s: 4.8.4 4.10.0 > GZIP interceptor added as a CXF feature is not working properly for CXF SOAP > and CXF REST on Camel Spring Boot > -------------------------------------------------------------------------------------------------------------- > > Key: CAMEL-21604 > URL: https://issues.apache.org/jira/browse/CAMEL-21604 > Project: Camel > Issue Type: Bug > Components: camel-cxf, camel-cxfrs > Affects Versions: 4.8.2 > Reporter: Adriano Machado > Priority: Major > Fix For: 4.8.4, 4.10.0 > > > Adding the following GZIP feature to enable interceptors: > > {code:java} > <beans xmlns="http://www.springframework.org/schema/beans" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:cxfrs="http://camel.apache.org/schema/cxf/jaxrs" > xsi:schemaLocation=" > http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans.xsd > http://camel.apache.org/schema/cxf/jaxrs > http://camel.apache.org/schema/cxf/jaxrs/camel-cxf.xsd"> > <cxfrs:rsClient address="${search.service.endpoint}" > id="rs-service-client" > serviceClass="my.example.search.SearchResource" > loggingFeatureEnabled="true"> > <cxfrs:features> > <bean > class="org.apache.cxf.transport.common.gzip.GZIPFeature" /> > </cxfrs:features> > </cxfrs:rsClient> > </beans>{code} > Generates the following exception when the service is called at runtime: > > {noformat} > java.lang.UnsupportedOperationException: null > at java.base/java.util.AbstractList.add(AbstractList.java:153) ~[na:na] > at java.base/java.util.AbstractList.add(AbstractList.java:111) ~[na:na] > at > org.apache.cxf.transport.common.gzip.GZIPOutInterceptor.addHeader(GZIPOutInterceptor.java:333) > ~[cxf-core-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at > org.apache.cxf.transport.common.gzip.GZIPOutInterceptor.gzipPermitted(GZIPOutInterceptor.java:189) > ~[cxf-core-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at > org.apache.cxf.transport.common.gzip.GZIPOutInterceptor.handleMessage(GZIPOutInterceptor.java:137) > ~[cxf-core-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) > ~[cxf-core-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at > org.apache.cxf.jaxrs.client.AbstractClient.doRunInterceptorChain(AbstractClient.java:717) > ~[cxf-rt-rs-client-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at > org.apache.cxf.jaxrs.client.ClientProxyImpl.doInvokeAsync(ClientProxyImpl.java:992) > ~[cxf-rt-rs-client-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at > org.apache.cxf.jaxrs.client.ClientProxyImpl.doChainedInvocation(ClientProxyImpl.java:922) > ~[cxf-rt-rs-client-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at > org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:347) > ~[cxf-rt-rs-client-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at jdk.proxy3/jdk.proxy3.$Proxy184.iborUpdateMemberPreferences(Unknown > Source) ~[na:na] > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) ~[na:na] > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) > ~[na:na] > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > ~[na:na] > at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na] > at > org.apache.camel.component.cxf.jaxrs.CxfRsProducer.invokeAsyncProxyClient(CxfRsProducer.java:233) > ~[camel-cxf-rest-4.8.0.redhat-00017.jar:4.8.0.redhat-00017] > at > org.apache.camel.component.cxf.jaxrs.CxfRsProducer.process(CxfRsProducer.java:121) > ~[camel-cxf-rest-4.8.0.redhat-00017.jar:4.8.0.redhat-00017] > at > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:208) > ~[camel-core-processor-4.8.0.redhat-00017.jar:4.8.0.redhat-00017] > at > org.apache.camel.impl.engine.CamelInternalProcessor.processNonTransacted(CamelInternalProcessor.java:347) > ~[camel-base-engine-4.8.0.redhat-00017.jar:4.8.0.redhat-00017] > at > org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:323) > ~[camel-base-engine-4.8.0.redhat-00017.jar:4.8.0.redhat-00017] > at > org.apache.camel.processor.Pipeline$PipelineTask.run(Pipeline.java:102) > ~[camel-core-processor-4.8.0.redhat-00017.jar:4.8.0.redhat-00017] > at > org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.doRun(DefaultReactiveExecutor.java:199) > ~[camel-base-engine-4.8.0.redhat-00017.jar:4.8.0.redhat-00017] > at > org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.executeReactiveWork(DefaultReactiveExecutor.java:189) > ~[camel-base-engine-4.8.0.redhat-00017.jar:4.8.0.redhat-00017] > at > org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.tryExecuteReactiveWork(DefaultReactiveExecutor.java:166) > ~[camel-base-engine-4.8.0.redhat-00017.jar:4.8.0.redhat-00017] > at > org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) > ~[camel-base-engine-4.8.0.redhat-00017.jar:4.8.0.redhat-00017] > at > org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:59) > ~[camel-base-engine-4.8.0.redhat-00017.jar:4.8.0.redhat-00017] > at org.apache.camel.processor.Pipeline.process(Pipeline.java:163) > ~[camel-core-processor-4.8.0.redhat-00017.jar:4.8.0.redhat-00017] > at > org.apache.camel.impl.engine.CamelInternalProcessor.processNonTransacted(CamelInternalProcessor.java:347) > ~[camel-base-engine-4.8.0.redhat-00017.jar:4.8.0.redhat-00017] > at > org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:323) > ~[camel-base-engine-4.8.0.redhat-00017.jar:4.8.0.redhat-00017] > at > org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.asyncInvoke(CxfRsInvoker.java:100) > ~[camel-cxf-rest-4.8.0.redhat-00017.jar:4.8.0.redhat-00017] > at > org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.performInvocation(CxfRsInvoker.java:72) > ~[camel-cxf-rest-4.8.0.redhat-00017.jar:4.8.0.redhat-00017] > at > org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96) > ~[cxf-core-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200) > ~[cxf-rt-frontend-jaxrs-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:103) > ~[cxf-rt-frontend-jaxrs-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at > org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59) > ~[cxf-core-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at > org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96) > ~[cxf-core-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) > ~[cxf-core-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at > org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) > ~[cxf-core-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at > org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265) > ~[cxf-rt-transports-http-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at > org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:233) > ~[cxf-rt-transports-http-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at > org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:207) > ~[cxf-rt-transports-http-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at > org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:159) > ~[cxf-rt-transports-http-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at > org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:224) > ~[cxf-rt-transports-http-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at > org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:303) > ~[cxf-rt-transports-http-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at > org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:216) > ~[cxf-rt-transports-http-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:547) > ~[jakarta.servlet-api-6.0.0.redhat-00006.jar:6.0.0.redhat-00006] > at > org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:278) > ~[cxf-rt-transports-http-4.0.5.fuse-redhat-00019.jar:4.0.5.fuse-redhat-00019] > at > io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) > ~[spring-web-6.1.15.jar:6.1.15] > at > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) > ~[spring-web-6.1.15.jar:6.1.15] > at > io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) > ~[spring-web-6.1.15.jar:6.1.15] > at > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) > ~[spring-web-6.1.15.jar:6.1.15] > at > io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > org.springframework.web.filter.ServerHttpObservationFilter.doFilterInternal(ServerHttpObservationFilter.java:113) > ~[spring-web-6.1.15.jar:6.1.15] > at > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) > ~[spring-web-6.1.15.jar:6.1.15] > at > io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) > ~[spring-web-6.1.15.jar:6.1.15] > at > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) > ~[spring-web-6.1.15.jar:6.1.15] > at > io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:117) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) > ~[undertow-core-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) > ~[undertow-core-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) > ~[undertow-core-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) > ~[undertow-core-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) > ~[undertow-core-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.handlers.SendErrorPageHandler.handleRequest(SendErrorPageHandler.java:52) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) > ~[undertow-core-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.handlers.SessionRestoringHandler.handleRequest(SessionRestoringHandler.java:119) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:276) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:132) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:256) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:101) > ~[undertow-servlet-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.server.Connectors.executeRootHandler(Connectors.java:395) > ~[undertow-core-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at > io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:896) > ~[undertow-core-2.3.18.SP1-redhat-00001.jar:2.3.18.SP1-redhat-00001] > at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18) > ~[jboss-threads-3.5.0.Final.jar:3.5.0.Final] > at > org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513) > ~[jboss-threads-3.5.0.Final.jar:3.5.0.Final] > at > org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538) > ~[jboss-threads-3.5.0.Final.jar:3.5.0.Final] > at > org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1282) > ~[xnio-api-3.8.16.Final-redhat-00001.jar:3.8.16.Final-redhat-00001] > at java.base/java.lang.Thread.run(Thread.java:840) ~[na:na]{noformat} > > I'm trying to work on a reproducer at [ammachado/camel at > cxf-gzip-test|https://github.com/ammachado/camel/tree/cxf-gzip-test]. -- This message was sent by Atlassian Jira (v8.20.10#820010)