camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Riaan Annandale (JIRA)" <>
Subject [jira] [Created] (CAMEL-12081) XQuery NPE going from saxon 9.5 to 9.7 (upgraded camel from2.17.4-> 2.20.1)
Date Thu, 14 Dec 2017 06:07:00 GMT
Riaan Annandale created CAMEL-12081:

             Summary: XQuery NPE going from saxon 9.5 to 9.7 (upgraded camel from2.17.4->
                 Key: CAMEL-12081
             Project: Camel
          Issue Type: Bug
          Components: camel-saxon
    Affects Versions: 2.20.1
         Environment: JDK 1.8.0_144. Windows 10 and Centos 7
            Reporter: Riaan Annandale

Hi guys

I think saxon went to 9.7 in camel 2.18 (could be 19). Anyway, I used the latest to illustrate
my problem (2.20.1 at the time of writing)

I have a routes that receive XML payloads which I then transform via xqueries. Inside these
I use local functions for readability (read: it's the first thing I tried when solving my
problem and it worked). 

Since saxon went to 9.7 I get a null pointer exception when an xquery containing a local function
tries to process the XML.

To demonstrate this, I have made a GitHub project:

In the project I use two xqueries to transform the same source. 
- One uses an inline for loop:
	<variables>{for $v in /root/Data return $v/Name}</variables>

- One uses the local function style:
declare function local:loopMe($nodes)
   for $node in $nodes


The latter is the one that returns the NPE.

I know I could probably go refactor all my xqueries to match the inline style, but I figured
I'd see if there is an issue here other than PEBKAC. They also get quite complex, so it's
quite a bit of work.

Thanks guys

This message was sent by Atlassian JIRA

View raw message