Project

Profile

Help

ArrayIndexOutOfBoundsException: -999

Added by Anonymous over 16 years ago

Legacy ID: #4735332 Legacy Poster: Jess Holle (jess_holle)

I'm getting this exception message from Saxon 9.0.0.2 and 9.0.0.3. A more complete trace is: java.lang.ArrayIndexOutOfBoundsException: -999 at net.sf.saxon.expr.XPathContextMinor.setLocalVariable(XPathContextMinor.java:349) at net.sf.saxon.expr.QuantifiedExpression.effectiveBooleanValue(QuantifiedExpression.java:204) at net.sf.saxon.pattern.LocationPathPattern.internalMatches(LocationPathPattern.java:497) at net.sf.saxon.pattern.LocationPathPattern.internalMatches(LocationPathPattern.java:437) at net.sf.saxon.pattern.LocationPathPattern.matches(LocationPathPattern.java:409) at net.sf.saxon.trans.Mode.getRule(Mode.java:251) at net.sf.saxon.trans.RuleManager.getTemplateRule(RuleManager.java:160) at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:327) at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:208) at net.sf.saxon.instruct.ApplyTemplates.process(ApplyTemplates.java:168) at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:298) at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:205) at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:175) at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:343) at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:208) at net.sf.saxon.instruct.ApplyTemplates.process(ApplyTemplates.java:168) at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:298) at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:205) at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:175) at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:343) at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:208) at net.sf.saxon.instruct.ApplyTemplates.process(ApplyTemplates.java:168) at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:298) at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:205) at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:175) at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:343) at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:208) at net.sf.saxon.instruct.ApplyTemplates.process(ApplyTemplates.java:168) at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:298) at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:205) at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:175) at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:343) at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:208) at net.sf.saxon.instruct.ApplyTemplates.process(ApplyTemplates.java:168) at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:252) at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:399) at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:175) at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:343) at net.sf.saxon.Controller.transformDocument(Controller.java:1735) at net.sf.saxon.Controller.transform(Controller.java:1559) at org.apache.tools.ant.taskdefs.optional.TraXLiaison.transform(TraXLiaison.java:187) at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:709) at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:333) ... The XSLT in question is fairly simple. Help would be appreciated. I'm pretty sure this worked not very long ago -- but haven't managed to try 9.0.0.1, 9.0.0.0, etc, yet.


Replies (8)

Please register to reply

RE: ArrayIndexOutOfBoundsException: -999 - Added by Anonymous over 16 years ago

Legacy ID: #4735536 Legacy Poster: Michael Kay (mhkay)

Could you send me the XSLT in question? I can see the general area it's in from the stack trace - and I know it's an area that's problematic - but I won't be able to diagnose it and fix it without a reproducible test case.

RE: ArrayIndexOutOfBoundsException: -999 - Added by Anonymous over 16 years ago

Legacy ID: #4735967 Legacy Poster: Jess Holle (jess_holle)

Michael, I e-mailed you the XSLT and the XML it failed on. Thanks.

RE: ArrayIndexOutOfBoundsException: -999 - Added by Anonymous over 16 years ago

Legacy ID: #4735986 Legacy Poster: Michael Kay (mhkay)

It looks very like this bug http://sourceforge.net/tracker/index.php?func=detail&aid=1855418&group_id=29872&atid=397617 which was supposedly fixed in 9.0.0.3 Michael Kay

RE: ArrayIndexOutOfBoundsException: -999 - Added by Anonymous over 16 years ago

Legacy ID: #4736038 Legacy Poster: Michael Kay (mhkay)

This stylesheet is working for me, under all the releases I've tried it on. Can you send me the source document you're working with (I can't see how it's relevant, but it's a case of trying everything). And can you try running from the command line rather than Ant? Michael Kay http://www.saxonica.com/

RE: ArrayIndexOutOfBoundsException: -999 - Added by Anonymous over 16 years ago

Legacy ID: #4736048 Legacy Poster: Michael Kay (mhkay)

OK, I've got the XML source now (it arrived in my spam bucket). And I've reproduced the failure, which only occurs with Saxon-SA.

RE: ArrayIndexOutOfBoundsException: -999 - Added by Anonymous over 16 years ago

Legacy ID: #4736052 Legacy Poster: Michael Kay (mhkay)

In fact (sorry for the stream of messages) it's failing for me with Saxon-SA 9.0.0.2. and runs OK with Saxon-SA 9.0.0.3, which appears to confirm the theory that it's caused by http://sourceforge.net/tracker/index.php?func=detail&aid=1855418&group_id=29872&atid=397617 Are you sure you ran it on 9.0.0.3? Michael Kay

RE: ArrayIndexOutOfBoundsException: -999 - Added by Anonymous over 16 years ago

Legacy ID: #4736373 Legacy Poster: Jess Holle (jess_holle)

This is with Saxon-B ala saxonb9-0-0-3j.zip. I thought maybe this was Java 6 Update 4, but I get the same issue with Java 5 Update 14. In all cases I'm launching from Ant 1.7.0.

RE: ArrayIndexOutOfBoundsException: -999 - Added by Anonymous over 16 years ago

Legacy ID: #4736428 Legacy Poster: Jess Holle (jess_holle)

Mea culpa. I was using 9.0.0.2. 9.0.0.3 was in my classpath but 9.0.0.2 was in my Ant lib directory. 9.0.0.3 fixes the problem.

    (1-8/8)

    Please register to reply