I am using 9.1.0.8 with Xerces and getting the following intermittent error. Most of the time it works fine.

 

java.lang.NullPointerException

        at net.sf.saxon.dom.NodeWrapper$ChildEnumeration.skipFollowingTextNodes(NodeWrapper.java:1142)

        at net.sf.saxon.dom.NodeWrapper$ChildEnumeration.next(NodeWrapper.java:1169)

        at net.sf.saxon.om.Navigator$AxisFilter.next(Navigator.java:885)

        at net.sf.saxon.om.Navigator.copy(Navigator.java:566)

        at net.sf.saxon.dom.NodeWrapper.copy(NodeWrapper.java:848)

        at net.sf.saxon.event.ComplexContentOutputter.append(ComplexContentOutputter.java:491)

        at net.sf.saxon.expr.Expression.process(Expression.java:476)

        at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:296)

        at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:556)

        at net.sf.saxon.instruct.Instruction.process(Instruction.java:93)

        at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:296)

        at net.sf.saxon.instruct.Choose.processLeavingTail(Choose.java:686)

        at net.sf.saxon.instruct.Instruction.process(Instruction.java:93)

        at net.sf.saxon.query.XQueryExpression.run(XQueryExpression.java:394)

        at edu.iastate.its.thinkspace.core.SpaceModel.execute(SpaceModel.java:241)

 

The xquery code is

xquery version "1.0";

declare namespace QueryUpdate = "java:edu.iastate.its.thinkspace.core.xquery.QueryUpdate";

 

declare variable $_operationType external;

declare variable $user external;

declare variable $upd external;

declare variable $args external;

declare variable $dir := concat('/space/',$args/args/pid/.,'/assignments/',$args/args/assignmentId/.,'/');

declare variable $file := concat($dir,'phase',$args/args/phaseId/.,'.xml');

 

if ($_operationType = "fetch") then (

      let $status := ''

      return

          <response>

                  <status>0</status>

                  <data>

                        {doc(concat('file(',$file,')'))/phase/resources/resource}

                  </data>

          </response>

…. Other xquery code not relevant to this problem.  I have a URI resolver that builds the document listed in the doc(concat…) code.

 

And the xml file is

 

<?xml version="1.0" encoding="UTF-8"?>

<phase _n="28">

   <content _id="1">… lots of escaped HTML </content>

  <elements/>

   <resources>

      <resource _id="3">

         <title>Central College in Pella, IA</title>

         <url>http://www.central.edu/job-seekers/</url>

         <heading>Job Websites for PFF Partner Schools</heading>

      </resource>

      <resource _id="5">

         <title>Des Moines Area Community College in Des Moines, IA</title>

         <url>https://jobs.dmacc.edu/</url>

         <heading>Job Websites for PFF Partner Schools</heading>

      </resource>

      <resource _id="7">

         <title>Drake University in Des Moines, IA</title>

         <url>https://drake.hiretouch.com/</url>

         <heading>Job Websites for PFF Partner Schools</heading>

      </resource>

      <resource _id="9">

         <title>Grand View University in Des Moines, IA</title>

         <url>http://grandview.hrmdirect.com</url>

         <heading>Job Websites for PFF Partner Schools</heading>

      </resource>

      <resource _id="11">

         <title>Grinnell College in Grinnell, IA</title>

         <url>https://jobs.grinnell.edu/</url>

         <heading>Job Websites for PFF Partner Schools</heading>

      </resource>

      <resource _id="13">

         <title>Simpson College in Indianola, IA</title>

         <url>http://simpson.edu/human-resources/employment-opportunities/</url>

         <heading>Job Websites for PFF Partner Schools</heading>

      </resource>

      <resource _id="15">

         <title>University of Northern Iowa in Cedar Falls, IA</title>

         <url>http://jobs.uni.edu/</url>

         <heading>Job Websites for PFF Partner Schools</heading>

      </resource>

      <resource _id="17">

         <title>Wartburg College in Waverly, IA</title>

         <url>http://www.wartburg.edu/hr/</url>

         <heading>Job Websites for PFF Partner Schools</heading>

      </resource>

      <resource _id="19">

         <title>Job search </title>

         <url>http://realserver.ait.iastate.edu:8080/ITS/Kienzler.html</url>

         <heading>Donna Kienzler's Job Search and Interview presentations</heading>

      </resource>

      <resource _id="21">

         <title>Interview</title>

         <url>http://realserver.ait.iastate.edu:8080/ITS/PFF_2_8_12.html</url>

         <heading>Donna Kienzler's Job Search and Interview presentations</heading>

      </resource>

      <resource _id="23">

         <title>Wolfgang Kliemann on Research Statements</title>

         <url>http://panopto.its.iastate.edu/Panopto/Pages/Viewer/Default.aspx?id=84f6f243-723b-4d24-a4b1-0fc36d898433</url>

         <heading>Research Statements Presentation</heading>

      </resource>

      <resource _id="25">

         <title>Writing Your Research Statement</title>

         <url>Research Statement-Comments'12.pdf</url>

         <heading>Research Statement Handouts</heading>

      </resource>

      <resource _id="27">

         <title>Example Research Statements</title>

         <url>Research Statement-Examples'12.pdf</url>

         <heading>Research Statement Handouts</heading>

      </resource>

   </resources>

</phase>

Pete Boysen(pboysen@iastate.edu)

Information Technology Services

209 Durham

(515)294-6663