Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-4594

Using Saxon to do XML split and xpath evaluation causes XPathExpression exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.8.2
    • 2.8.3, 2.9.0
    • camel-saxon
    • None
    • Unknown

    Description

      If you do a route like

                      from("direct:start")
                          .split().xpath("/persons/person")
                          .choice()
                              .when().xpath("person/city = 'London'")
                                  .to("mock:london")
                              .when().xpath("person/city = 'Paris'")
                                  .to("mock:paris")
                              .otherwise()
                                  .to("mock:other");
      

      Then Saxon throws this exception

      Caused by: javax.xml.xpath.XPathExpressionException: Supplied node must be built using the same or a compatible Configuration
      	at net.sf.saxon.xpath.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:284)
      	at org.apache.camel.builder.xml.XPathBuilder.doInEvaluateAs(XPathBuilder.java:677)
      	... 77 more
      

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            davsclaus Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: