[ 
https://issues.apache.org/jira/browse/CXF-9097?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Freeman Yue Fang updated CXF-9097:
----------------------------------
    Affects Version/s: 4.0.6
                       3.6.5

> Camel 3|CXF|Tomcat: Request has been recycled
> ---------------------------------------------
>
>                 Key: CXF-9097
>                 URL: https://issues.apache.org/jira/browse/CXF-9097
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.6.5, 4.0.6
>            Reporter: Manuel Shenavai
>            Assignee: Freeman Yue Fang
>            Priority: Major
>
> We see the following error when calling a oneWay endpoint on Tomcat 9:
> java.lang.IllegalStateException: The request object has been recycled and is 
> no longer associated with this facade
>       at 
> org.apache.catalina.connector.RequestFacade.checkFacade(RequestFacade.java:856)
>  ~[tomcat-embed-core-9.0.83.jar:9.0.83]
>       at 
> org.apache.catalina.connector.RequestFacade.getUserPrincipal(RequestFacade.java:610)
>  ~[tomcat-embed-core-9.0.83.jar:9.0.83]
>       at 
> org.apache.cxf.transport.http.AbstractHTTPDestination$2.getUserPrincipal(AbstractHTTPDestination.java:397)
>  ~[cxf-rt-transports-http-3.6.5.jar:3.6.5]
>       at 
> org.apache.camel.component.cxf.DefaultCxfBinding.populateExchangeFromCxfRequest(DefaultCxfBinding.java:317)
>  ~[camel-cxf-3.17.0.jar:3.17.0]
>       at 
> org.apache.camel.component.cxf.CxfConsumer$CxfConsumerInvoker.prepareCamelExchange(CxfConsumer.java:297)
>  ~[camel-cxf-3.17.0.jar:3.17.0]
>       at 
> org.apache.camel.component.cxf.CxfConsumer$CxfConsumerInvoker.syncInvoke(CxfConsumer.java:235)
>  ~[camel-cxf-3.17.0.jar:3.17.0]
>       at 
> org.apache.camel.component.cxf.CxfConsumer$CxfConsumerInvoker.invoke(CxfConsumer.java:162)
>  ~[camel-cxf-3.17.0.jar:3.17.0]
>       at 
> org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
>  ~[cxf-core-3.6.5.jar:3.6.5]
>       at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
>  ~[na:na]
>       at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) 
> ~[na:na]
>       at 
> org.apache.cxf.interceptor.ServiceInvokerInterceptor$2.run(ServiceInvokerInterceptor.java:126)
>  ~[cxf-core-3.6.5.jar:3.6.5]
>       at 
> org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
>  ~[cxf-core-3.6.5.jar:3.6.5]
>       at 
> org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:131)
>  ~[cxf-core-3.6.5.jar:3.6.5]
>       at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
>  ~[cxf-core-3.6.5.jar:3.6.5]
>       at 
> org.apache.cxf.phase.PhaseInterceptorChain.resume(PhaseInterceptorChain.java:277)
>  ~[cxf-core-3.6.5.jar:3.6.5]
>       at 
> org.apache.cxf.interceptor.OneWayProcessorInterceptor$1.run(OneWayProcessorInterceptor.java:139)
>  ~[cxf-core-3.6.5.jar:3.6.5]
>       at 
> org.apache.cxf.workqueue.AutomaticWorkQueueImpl$3.run(AutomaticWorkQueueImpl.java:413)
>  ~[cxf-core-3.6.5.jar:3.6.5]
>       at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
>  ~[na:na]
>       at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
>  ~[na:na]
>       at 
> org.apache.cxf.workqueue.AutomaticWorkQueueImpl$AWQThreadFactory$1.run(AutomaticWorkQueueImpl.java:346)
>  ~[cxf-core-3.6.5.jar:3.6.5]
>       at java.base/java.lang.Thread.run(Thread.java:840) ~[na:na]
> The problem seems to be related to Tomcat 9 / org.apache.catalina.connector. 
> RECYCLE_FACADES
> https://tomcat.apache.org/tomcat-9.0-doc/config/systemprops.html
> Camel: 3.17
> CXF: 3.6.5
> Tomcat 9.0.98
> Reproducer:
> https://github.com/mash-sap/cxfOneWayError/blob/recycleError/README.md



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

Reply via email to