Hello all, I have a camel route (route1) which has as entry point a cxf webservice. The camel route (route1) calls an another route (route2), which has a long processing step (let's call it delay - which takes more than 30s). 1. route1 -> seda->route2 (delay 40s) - works as expected, and the webservice waits until the routes are completed.2. route1 ->activemq queue -> route2 (delay 40s) - throws an exception after 30s, sends back an error response, but route is executed, even after the exception In both cases, the <to> operation timeout is configured to be more than 40s needed in the camel step. I attached a sample process. Questions : why i get the exception in second case, and what can i do to have my webservice call wait for entire processing of the camel route?
- Karaf 4.0.4- camel 2.16.1- cxf 3.1.4- activemq 5.13.1 ThanksLAji
2016-06-14 09:31:55,249 | DEBUG | ss/WSTimeoutTest | PhaseInterceptorChain | 52 - org.apache.cxf.cxf-core - 3.1.4 | Invoking handleMessage on interceptor org.apache.cxf.interceptor.ServiceInvokerInterceptor@574ac561 2016-06-14 09:31:55,249 | DEBUG | ss/WSTimeoutTest | PhaseInterceptorChain | 52 - org.apache.cxf.cxf-core - 3.1.4 | Invoking handleFault on interceptor org.apache.cxf.interceptor.ServiceInvokerInterceptor@574ac561 2016-06-14 09:31:55,249 | DEBUG | ss/WSTimeoutTest | PhaseInterceptorChain | 52 - org.apache.cxf.cxf-core - 3.1.4 | Invoking handleFault on interceptor org.apache.cxf.ws.mex.MEXInInterceptor@4608f8af 2016-06-14 09:31:55,249 | DEBUG | ss/WSTimeoutTest | PhaseInterceptorChain | 52 - org.apache.cxf.cxf-core - 3.1.4 | Invoking handleFault on interceptor org.apache.cxf.javascript.JavascriptGetInterceptor@2b5cf151 2016-06-14 09:31:55,249 | DEBUG | ss/WSTimeoutTest | PhaseInterceptorChain | 52 - org.apache.cxf.cxf-core - 3.1.4 | Invoking handleFault on interceptor org.apache.camel.component.cxf.interceptors.RawMessageWSDLGetInterceptor@6b55c722 2016-06-14 09:31:55,249 | DEBUG | ss/WSTimeoutTest | PhaseInterceptorChain | 52 - org.apache.cxf.cxf-core - 3.1.4 | Invoking handleFault on interceptor org.apache.cxf.transport.https.CertConstraintsInterceptor@40a2e8a6 2016-06-14 09:31:55,249 | DEBUG | ss/WSTimeoutTest | PhaseInterceptorChain | 52 - org.apache.cxf.cxf-core - 3.1.4 | Invoking handleFault on interceptor org.apache.cxf.ws.policy.PolicyInInterceptor@5671c31a 2016-06-14 09:31:55,249 | WARN | ss/WSTimeoutTest | PhaseInterceptorChain | 52 - org.apache.cxf.cxf-core - 3.1.4 | Interceptor for {http://www.globustravel.com/Services}GlobusTravel has thrown exception, unwinding now java.lang.NullPointerException at org.apache.camel.impl.DefaultConsumer.doneUoW(DefaultConsumer.java:103)[40:org.apache.camel.camel-core:2.16.1] at org.apache.camel.component.cxf.CxfConsumer$1.asyncInvoke(CxfConsumer.java:112)[41:org.apache.camel.camel-cxf:2.16.1] at org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:75)[41:org.apache.camel.camel-cxf:2.16.1] at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)[52:org.apache.cxf.cxf-core:3.1.4] at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)[52:org.apache.cxf.cxf-core:3.1.4] at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)[52:org.apache.cxf.cxf-core:3.1.4] at org.apache.cxf.phase.PhaseInterceptorChain.resume(PhaseInterceptorChain.java:278)[52:org.apache.cxf.cxf-core:3.1.4] at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)[52:org.apache.cxf.cxf-core:3.1.4] at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:251)[77:org.apache.cxf.cxf-rt-transports-http:3.1.4] at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)[77:org.apache.cxf.cxf-rt-transports-http:3.1.4] at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)[77:org.apache.cxf.cxf-rt-transports-http:3.1.4] at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)[77:org.apache.cxf.cxf-rt-transports-http:3.1.4] at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180)[77:org.apache.cxf.cxf-rt-transports-http:3.1.4] at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:293)[77:org.apache.cxf.cxf-rt-transports-http:3.1.4] at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:212)[77:org.apache.cxf.cxf-rt-transports-http:3.1.4] at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)[16:javax.servlet-api:3.1.0] at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:268)[77:org.apache.cxf.cxf-rt-transports-http:3.1.4] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)[173:org.eclipse.jetty.servlet:9.2.14.v20151106] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)[173:org.eclipse.jetty.servlet:9.2.14.v20151106] at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[191:org.ops4j.pax.web.pax-web-jetty:4.2.4] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[172:org.eclipse.jetty.server:9.2.14.v20151106] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)[171:org.eclipse.jetty.security:9.2.14.v20151106] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[172:org.eclipse.jetty.server:9.2.14.v20151106] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[172:org.eclipse.jetty.server:9.2.14.v20151106] at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:271)[191:org.ops4j.pax.web.pax-web-jetty:4.2.4] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[173:org.eclipse.jetty.servlet:9.2.14.v20151106] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[172:org.eclipse.jetty.server:9.2.14.v20151106] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[172:org.eclipse.jetty.server:9.2.14.v20151106] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[172:org.eclipse.jetty.server:9.2.14.v20151106] at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)[191:org.ops4j.pax.web.pax-web-jetty:4.2.4] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[172:org.eclipse.jetty.server:9.2.14.v20151106] at org.eclipse.jetty.server.Server.handleAsync(Server.java:545)[172:org.eclipse.jetty.server:9.2.14.v20151106] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:318)[172:org.eclipse.jetty.server:9.2.14.v20151106] at org.eclipse.jetty.server.HttpChannel.run(HttpChannel.java:262)[172:org.eclipse.jetty.server:9.2.14.v20151106] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[175:org.eclipse.jetty.util:9.2.14.v20151106] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[175:org.eclipse.jetty.util:9.2.14.v20151106] at java.lang.Thread.run(Thread.java:745)[:1.8.0_45] 2016-06-14 09:31:55,250 | DEBUG | ss/WSTimeoutTest | PhaseInterceptorChain | 52 - org.apache.cxf.cxf-core - 3.1.4 | Adding interceptor org.apache.cxf.ws.policy.ServerPolicyOutFaultInterceptor@15d315dd to phase setup 2016-06-14 09:31:55,250 | DEBUG | ss/WSTimeoutTest | PhaseInterceptorChain | 52 - org.apache.cxf.cxf-core - 3.1.4 | Adding interceptor org.apache.cxf.jaxws.interceptors.WebFaultOutInterceptor@661e5f3a to phase pre-protocol 2016-06-14 09:31:55,250 | DEBUG | ss/WSTimeoutTest | PhaseInterceptorChain | 52 - org.apache.cxf.cxf-core - 3.1.4 | Adding interceptor org.apache.cxf.interceptor.MessageSenderInterceptor@792b688c to phase prepare-send 2016-06-14 09:31:55,250 | DEBUG | ss/WSTimeoutTest | PhaseInterceptorChain | 52 - org.apache.cxf.cxf-core - 3.1.4 | Adding interceptor org.apache.cxf.interceptor.StaxOutInterceptor@40755064 to phase pre-stream 2016-06-14 09:31:55,250 | DEBUG | ss/WSTimeoutTest | PhaseInterceptorChain | 52 - org.apache.cxf.cxf-core - 3.1.4 | Adding interceptor org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor@4f1cc039 to phase write 2016-06-14 09:31:55,250 | DEBUG | ss/WSTimeoutTest | PhaseInterceptorChain | 52 - org.apache.cxf.cxf-core - 3.1.4 | Adding interceptor org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor@5befa16f to phase write 2016-06-14 09:31:55,250 | DEBUG | ss/WSTimeoutTest | PhaseInterceptorChain | 52 - org.apache.cxf.cxf-core - 3.1.4 | Adding interceptor org.apache.cxf.binding.soap.interceptor.SoapHeaderOutFilterInterceptor@6f82cc28 to phase pre-logical 2016-06-14 09:31:55,250 | DEBUG | ss/WSTimeoutTest | PhaseInterceptorChain | 52 - org.apache.cxf.cxf-core - 3.1.4 | Adding interceptor org.apache.cxf.binding.soap.interceptor.Soap11FaultOutInterceptor@7922cd96 to phase prepare-send 2016-06-14 09:31:55,250 | DEBUG | ss/WSTimeoutTest | PhaseInterceptorChain | 52 - org.apache.cxf.cxf-core - 3.1.4 | Chain org.apache.cxf.phase.PhaseInterceptorChain@133e54a6 was created. Current flow: setup [ServerPolicyOutFaultInterceptor] pre-logical [SoapHeaderOutFilterInterceptor] prepare-send [MessageSenderInterceptor, Soap11FaultOutInterceptor] pre-stream [StaxOutInterceptor] pre-protocol [WebFaultOutInterceptor]
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring" xmlns:cxf="http://camel.apache.org/schema/cxf" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd"> <bean id="toActivemq" class="org.apache.activemq.camel.component.ActiveMQComponent"> <property name="connectionFactory"> <bean class="org.apache.activemq.ActiveMQConnectionFactory"> <property name="brokerURL" value="tcp://localhost:61616" /> <property name="userName" value="admin"/> <property name="password" value="admin"/> </bean> </property> </bean> <camel:camelContext id="WSTimeoutTest" streamCache="true" allowUseOriginalMessage="false"> <camel:route id="WSTimeout"> <!--route starts from the cxf webservice in POJO mode--> <camel:from uri="cxf:bean:GlobusTravel"/> <camel:to uri="toActivemq:queue:IN_ChildRoute?requestTimeout=6000000" /> <!--<camel:to uri="seda:IN_ChildRoute?timeout=6000000"/>--> </camel:route> <camel:route id="ChildRoute" trace="true" streamCache="false" > <camel:from uri="toActivemq:queue:IN_ChildRoute"/> <!--<camel:from uri="seda:IN_ChildRoute"/>--> <camel:to uri="seda:makeCall?timeout=7000000"/> </camel:route> <camel:route id="Call"> <camel:from uri="seda:makeCall"/> <camel:delay> <camel:constant>40000</camel:constant> </camel:delay> </camel:route> </camel:camelContext> </beans>