Camel
  1. Camel
  2. CAMEL-4594

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

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.2
    • Fix Version/s: 2.8.3, 2.9.0
    • Component/s: camel-saxon
    • Labels:
      None
    • Estimated Complexity:
      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
      

        Activity

        Claus Ibsen made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.8.3 [ 12318649 ]
        Fix Version/s 2.9.0 [ 12316374 ]
        Resolution Fixed [ 1 ]
        Claus Ibsen created issue -

          People

          • Assignee:
            Claus Ibsen
            Reporter:
            Claus Ibsen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development