Re: CXF consumer endpoint + XSLT + Tracer = EmptyStackException
Hi, You can also try to convert your body to a string prior to calling your XSLT. This worked for me when I had this issue: camel:convertBodyTo type=java.lang.String/ Thanks, Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/CXF-consumer-endpoint-XSLT-Tracer-EmptyStackException-tp5741942p5743127.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: CXF consumer endpoint + XSLT + Tracer = EmptyStackException
Can you change the CXF endpoint data format from PAYLOAD to MESSAGE just like this ? from uri=cxf:bean:OrderService?dataFormat=MESSAGE”/ If I remember right there was an issue in turn CXF PAYLOAD message into a DOM in camel-2.10.x. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Tuesday, October 22, 2013 at 5:30 AM, alapaka wrote: I suspect it may have to do with the type of object in the message, though It does not appear to be an issue with stream caching. I'm a newbie, so my grasp of the internals is still superficial. I tried stream caching at both context and route level without success. Also, there are several steps after the incoming consumer that shows the incoming message to be readable more than once. It seems to be an issue with the XSLT endpoint; I have encountered a similar issue with a wireTap in a route with two XSLT endpoints; having the wireTap before the first XSLT endpoint results in the same EmptyStackException - funny though because I can have any number of wireTaps after that first XSLT endpoint and the second XSLT performs as expected. I will do a little more playing around to see if I can isolate this problem better - it seems to be related to the CXF consumer at the start of the route as well; I am using the default XSLT transformer class, I will try to substitute xalan for example. aloha -- View this message in context: http://camel.465427.n5.nabble.com/CXF-consumer-endpoint-XSLT-Tracer-EmptyStackException-tp5741942p5742003.html Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
Re: CXF consumer endpoint + XSLT + Tracer = EmptyStackException
Hi Maybe this page can help http://camel.apache.org/why-is-my-message-body-empty.html On Mon, Oct 21, 2013 at 6:30 AM, alapaka alap...@rocketmail.com wrote: Hi all; Versions: Camel 2.10.6, CXF 2.6.8, ServiceMix 4.5.2 I have a route that consumes a CXF endpoint: works fine I added an XSLT transform to handle the incoming payload: works fine I set trace=true on the route: java.util.EmptyStackException tracing with either the CXF consumer endpoint or the XSLT transform works fine. It seems only when I have the two in the same route that I get the error. I tried with both streamCache=true and false but no luck. here is the blueprint config containing the endpoint and route: blueprint xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:camelcxf=http://camel.apache.org/schema/blueprint/cxf; camelcxf:cxfEndpoint id=OrderService address=${webServicesIncomingURI}/NV_OrderService endpointName=s:NV_OrderServicePort serviceName=s:NV_OrderService wsdlURL=${repository}${wsdlPath}NV_OrderService.wsdl xmlns:s=http://myns.com.au/namespaces/NV/Order/ camelContext id=WebServiceGateway trace=false streamCache=false route id=XSLT_TraceTest trace=true streamCache=true from uri=file:D:/temp/xsl-test_request?noop=falseamp;idempotent=false/ log message=\nXSLT test:\n\n ${body}\n\n/ to uri=xslt:http://localhost/repository/stylesheets/Order_Request.xsl/ log message=\nXSLT test:\n\n ${body}\n\n/ pollEnrich uri=file:D:/temp/xsl-test_response?noop=true/ log message=\nXSLT test:\n\n ${body}\n\n/ /route please note that the file/pollEnrich consumers are there to replace the CXF endpoint and other internal processing to help isolate the error. here is the stack trace: 2013-10-21 15:00:54,149 | ERROR | qtp21434081-659 | DefaultErrorHandler | 100 - org.apache.camel.camel-core - 2.10.6 | Failed delivery for (Messag eId: ID-NMA02085-D7-54961-1382315079679-31-2 on ExchangeId: ID-NMA02085-D7-54961-1382315079679-31-1). Exhausted after delivery attempt: 1 caught: java.util.Empt yStackException java.util.EmptyStackException at org.apache.xml.utils.IntStack.peek(IntStack.java:127)[:] at org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.startElement(SAX2DTM.java:1883)[:] at org.apache.xalan.xsltc.trax.DOM2SAX.parse(DOM2SAX.java:285)[:] at org.apache.xalan.xsltc.trax.DOM2SAX.parse(DOM2SAX.java:149)[:] at org.apache.xml.dtm.ref.DTMManagerDefault.getDTM(DTMManagerDefault.java:439)[:] at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:699)[:] at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1273)[:] at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1251)[:] at org.apache.camel.builder.xml.XsltBuilder.process(XsltBuilder.java:128)[100:org.apache.camel.camel-core:2.10.6] at org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:101)[100:org.apache.camel.camel-core:2.10.6] at org.apache.camel.component.xslt.XsltEndpoint.onExchange(XsltEndpoint.java:81)[100:org.apache.camel.camel-core:2.10.6] at org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:71)[100:org.apache.camel.camel-core:2.10.6] at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[100:org.apache.cam el.camel-core:2.10.6] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[100:org.apache.camel.camel-core:2.10.6] at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:122)[100:org.apache.camel.camel-core:2.10.6] at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:298)[100:org.apache.camel.camel-core:2.10.6] at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:117)[100:org.apache.camel.camel-core:2.10.6] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[100:org.apache.camel.camel-core:2.10.6] at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[100:org.apache.camel.camel-core:2.10.6] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[100:org.apache.camel.camel-core:2.10.6] at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[100:org.apache.camel.camel-core:2.10.6] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[100:org.apache.camel.camel-core:2.10.6] at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[100:org.apache.camel.camel-core:2.10.6] at
Re: CXF consumer endpoint + XSLT + Tracer = EmptyStackException
I suspect it may have to do with the type of object in the message, though It does not appear to be an issue with stream caching. I'm a newbie, so my grasp of the internals is still superficial. I tried stream caching at both context and route level without success. Also, there are several steps after the incoming consumer that shows the incoming message to be readable more than once. It seems to be an issue with the XSLT endpoint; I have encountered a similar issue with a wireTap in a route with two XSLT endpoints; having the wireTap before the first XSLT endpoint results in the same EmptyStackException - funny though because I can have any number of wireTaps after that first XSLT endpoint and the second XSLT performs as expected. I will do a little more playing around to see if I can isolate this problem better - it seems to be related to the CXF consumer at the start of the route as well; I am using the default XSLT transformer class, I will try to substitute xalan for example. aloha -- View this message in context: http://camel.465427.n5.nabble.com/CXF-consumer-endpoint-XSLT-Tracer-EmptyStackException-tp5741942p5742003.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: CXF consumer endpoint + XSLT + Tracer = EmptyStackException
I had the cxf endpoint commented out in the route, and that did not come through in the post. here it is: from uri=cxf:bean:OrderService?dataFormat=PAYLOAD/ aloha -- View this message in context: http://camel.465427.n5.nabble.com/CXF-consumer-endpoint-XSLT-Tracer-EmptyStackException-tp5741942p5741946.html Sent from the Camel - Users mailing list archive at Nabble.com.