Uploaded image for project: 'Fuse Tooling'
  1. Fuse Tooling
  2. FUSETOOLS-2023

Remote Route Editing: InvalidXPathExpression with CBR template

    Details

    • Steps to Reproduce:
      Hide

      see attached video

      Show
      see attached video

      Description

      If I do some remote route editing on a project created from CBR template (Blueprint or Spring), I've got the following error (see attached video).

      Message History
      ---------------------------------------------------------------------------------------------------------------------------------------
      RouteId              ProcessorId          Processor                                                                        Elapsed (ms)
      [cbr-route         ] [cbr-route         ] [file://src/main/data?noop=true                                                ] [         0]
      [cbr-route         ] [_log1             ] [log                                                                           ] [         0]
      [cbr-route         ] [_choice1          ] [when[xpath{XPath: /order:order/order:customer/order:country = 'UK'}]choice[whe] [         0]
      
      Stacktrace
      ---------------------------------------------------------------------------------------------------------------------------------------
      org.apache.camel.builder.xml.InvalidXPathExpression: Invalid xpath: /order:order/order:customer/order:country = 'UK'. Reason: javax.xml.xpath.XPathExpressionException: com.sun.org.apache.xpath.internal.domapi.XPathStylesheetDOM3Exception: Prefix must resolve to a namespace: order
      	at org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:769)
      	at org.apache.camel.builder.xml.XPathBuilder.matches(XPathBuilder.java:155)
      	at org.apache.camel.processor.FilterProcessor.matches(FilterProcessor.java:65)
      	at org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:93)
      	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
      	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468)
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:121)
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
      	at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:454)
      	at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:226)
      	at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:190)
      	at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:175)
      	at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:102)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: javax.xml.xpath.XPathExpressionException: com.sun.org.apache.xpath.internal.domapi.XPathStylesheetDOM3Exception: Prefix must resolve to a namespace: order
      	at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.compile(XPathImpl.java:400)
      	at org.apache.camel.builder.xml.XPathBuilder.createXPathExpression(XPathBuilder.java:958)
      	at org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:767)
      	... 21 more
      Caused by: com.sun.org.apache.xpath.internal.domapi.XPathStylesheetDOM3Exception: Prefix must resolve to a namespace: order
      	at com.sun.org.apache.xpath.internal.compiler.XPathParser.errorForDOM3(XPathParser.java:657)
      	at com.sun.org.apache.xpath.internal.compiler.Lexer.mapNSTokens(Lexer.java:642)
      	at com.sun.org.apache.xpath.internal.compiler.Lexer.tokenize(Lexer.java:269)
      	at com.sun.org.apache.xpath.internal.compiler.Lexer.tokenize(Lexer.java:100)
      	at com.sun.org.apache.xpath.internal.compiler.XPathParser.initXPath(XPathParser.java:114)
      	at com.sun.org.apache.xpath.internal.XPath.<init>(XPath.java:180)
      	at com.sun.org.apache.xpath.internal.XPath.<init>(XPath.java:268)
      	at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.compile(XPathImpl.java:392)
      	... 23 more
      [read #4 - file://src/main/data] GenericFileOnCompletion        WARN  Rollback file strategy: org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy@3827e91a for file: GenericFile[order1.xml]
      [read #4 - file://src/main/data] cbr-route                      INFO  XXX
      [read #4 - file://src/main/data] DefaultErrorHandler            ERROR Failed delivery for (MessageId: ID-tsedmikntb-38849-1470658363574-0-63 on ExchangeId: ID-tsedmikntb-38849-1470658363574-0-64). Exhausted after delivery attempt: 1 caught: org.apache.camel.builder.xml.InvalidXPathExpression: Invalid xpath: /order:order/order:customer/order:country = 'UK'. Reason: javax.xml.xpath.XPathExpressionException: com.sun.org.apache.xpath.internal.domapi.XPathStylesheetDOM3Exception: Prefix must resolve to a namespace: order
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  aurelien.pupier Aurélien Pupier
                  Reporter:
                  tsedmik Tomáš Sedmík
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: