Project

Profile

Help

Bug #3194

closed

NPE: Internal error: expression . has no retained static context

Added by Gunther Rademacher about 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2017-04-05
Due date:
% Done:

100%

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

Description

For tracing operation of a REx parser, I am using a function like this:

declare function local:trace($line as xs:string) as xs:string?
{
  if (trace($line, "trace")) then () else ""[.]
};
java.lang.NullPointerException: Internal error: expression . has no retained static context
        at net.sf.saxon.expr.Expression.getConfiguration(Expression.java:1107)
        at net.sf.saxon.functions.BooleanFn.rewriteEffectiveBooleanValue(BooleanFn.java:53)
        at net.sf.saxon.functions.BooleanFn$1.optimize(BooleanFn.java:106)
        at net.sf.saxon.expr.FilterExpression.optimize(FilterExpression.java:335)
        at net.sf.saxon.expr.Operand.optimize(Operand.java:200)
        at net.sf.saxon.expr.instruct.Choose.optimize(Choose.java:475)
        at net.sf.saxon.query.XQueryExpression.<init>(XQueryExpression.java:85)
        at net.sf.saxon.Configuration.makeXQueryExpression(Configuration.java:3378)
        at net.sf.saxon.query.XQueryParser.makeXQueryExpression(XQueryParser.java:175)
        at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext.java:589)
        at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext.java:652)
        at net.sf.saxon.s9api.XQueryCompiler.compile(XQueryCompiler.java:606)
        at net.sf.saxon.Query.compileQuery(Query.java:795)
        at net.sf.saxon.Query.doQuery(Query.java:343)
        at net.sf.saxon.Query.main(Query.java:111)
Fatal error during query: java.lang.NullPointerException: Internal error: expression . has no retained static context
declare function local:trace($line as xs:string) as xs:string?
{
  if (trace($line, "trace")) then () else ""[.]
};
 
local:trace("bla bla")

Please register to edit this issue

Also available in: Atom PDF