Project

Profile

Help

Bug #2456

closed

"compileLibrary" fails for file with private variable

Added by Mariusz B about 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Category:
s9api API
Sprint/Milestone:
Start date:
2015-09-21
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.6
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:
Platforms:

Description

compileLibrary fails with NullPointer for xquery files with private variable.

java.lang.NullPointerException

at net.sf.saxon.query.QueryModule.bindVariable(QueryModule.java:1090)

at net.sf.saxon.expr.parser.XPathParser.parseVariableReference(XPathParser.java:1905)

at net.sf.saxon.expr.parser.XPathParser.parseBasicStep(XPathParser.java:1703)

at net.sf.saxon.expr.parser.XPathParser.parseStepExpression(XPathParser.java:1638)

at net.sf.saxon.expr.parser.XPathParser.parseRelativePath(XPathParser.java:1564)

at net.sf.saxon.expr.parser.XPathParser.parsePathExpression(XPathParser.java:1529)

at net.sf.saxon.expr.parser.XPathParser.parseSimpleMappingExpression(XPathParser.java:1541)

at net.sf.saxon.expr.parser.XPathParser.parseUnaryExpression(XPathParser.java:1419)

at net.sf.saxon.expr.parser.XPathParser.parseExprSingle(XPathParser.java:511)

at com.saxonica.ee.update.XQueryParserEE.parseExprSingle(XQueryParserEE.java:129)

at net.sf.saxon.expr.parser.XPathParser.parseExpression(XPathParser.java:450)

at net.sf.saxon.query.XQueryParser.parseFunctionDeclaration(XQueryParser.java:2063)

at net.sf.saxon.query.XQueryParser.parseProlog(XQueryParser.java:779)

at net.sf.saxon.query.XQueryParser.parseLibraryModule(XQueryParser.java:445)

at com.saxonica.ee.optim.StaticQueryContextEE.compileLibrary(StaticQueryContextEE.java:160)

at com.saxonica.ee.optim.StaticQueryContextEE.compileLibrary(StaticQueryContextEE.java:230)

at net.sf.saxon.s9api.XQueryCompiler.compileLibrary(XQueryCompiler.java:516)

at issue.XqueryPrivateMapIssueTest.shouldBeAbleToCompileWithCompileLibraryMethod(XqueryPrivateMapIssueTest.java:15)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)

at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)

at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)

at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)

at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)

at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)

at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)

at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)

at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)

at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)

at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)

at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)

at org.junit.runners.ParentRunner.run(ParentRunner.java:363)

at org.junit.runner.JUnitCore.run(JUnitCore.java:137)

at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)

at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)

at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)

Please see attached XqueryPrivateVariableIssueTest.

In order to run it please add saxon license to resources directory.


Files

Please register to edit this issue

Also available in: Atom PDF