Project

Profile

Help

Bug #4975

closed

Null pointer exception when outputting a warning with missing location information

Added by Graydon Saunders about 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Diagnostics
Sprint/Milestone:
-
Start date:
2021-04-22
Due date:
% Done:

100%

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

Description

in oXygen ( XML Editor 23.1, build 2021040908) with the 10.3 external add-on, the transform (small.xsl) works. oXygen 23 uses a Java 15 JRE

17:40 bin % ./java --version openjdk 15.0.1 2020-10-20 OpenJDK Runtime Environment (build 15.0.1+9-18) OpenJDK 64-Bit Server VM (build 15.0.1+9-18, mixed mode)

If I try to call small.xsl from the shell (Linux; Fedora 33, bash 5.0.17) using small.sh, I get a null pointer error.

I believe I have exhausted my ingenuity on this one and have a minimal example which I would prefer to send under separate cover.

The code from which the minimal example has been extracted has been working fine in oXygen; the minimal example itself runs fine in oXygen. Trying to run it from the command line for automated testing purposes hasn't made it past the null pointer error. Various other transforms run fine, Saxon finds the license OK, etc. I get what I think is the same error with Saxon 10.3 and 10.5, and with Java 11 and Java 16.

15:48 tests % java --version openjdk 11.0.10 2021-01-19 OpenJDK Runtime Environment 18.9 (build 11.0.10+9) OpenJDK 64-Bit Server VM 18.9 (build 11.0.10+9, mixed mode, sharing)

15:54 tests % /etc/alternatives/java_sdk_16/bin/java --version openjdk 16 2021-03-16 OpenJDK Runtime Environment 21.3 (build 16+36) OpenJDK 64-Bit Server VM 21.3 (build 16+36, mixed mode, sharing)

Stack Trace: 17:42 tests % ./small.sh (DITA2Word)-[one-githubTests-gds] java.lang.NullPointerException at java.base/java.util.Objects.requireNonNull(Objects.java:221) at net.sf.saxon.trans.XmlProcessingIncident.(XmlProcessingIncident.java:52) at net.sf.saxon.Controller.warning(Controller.java:469) at net.sf.saxon.resource.XmlResource.getItem(XmlResource.java:162) at net.sf.saxon.resource.UnknownResource.getItem(UnknownResource.java:88) at net.sf.saxon.resource.MetadataResource.lambda$getItem$0(MetadataResource.java:64) at net.sf.saxon.functions.CallableFunction.call(CallableFunction.java:128) at net.sf.saxon.functions.SystemFunction.dynamicCall(SystemFunction.java:459) at net.sf.saxon.functions.ApplyFn.call(ApplyFn.java:166) at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:548) at net.sf.saxon.expr.CardinalityChecker.evaluateItem(CardinalityChecker.java:283) at net.sf.saxon.expr.ItemChecker.evaluateItem(ItemChecker.java:255) at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:151) at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:148) at net.sf.saxon.expr.UserFunctionCall.evaluateArguments(UserFunctionCall.java:662) at net.sf.saxon.expr.UserFunctionCall.evaluateArguments(UserFunctionCall.java:644) at net.sf.saxon.expr.UserFunctionCall.callFunction(UserFunctionCall.java:534) at net.sf.saxon.expr.UserFunctionCall.evaluateItem(UserFunctionCall.java:491) at net.sf.saxon.expr.LookupExpression.iterate(LookupExpression.java:337) at net.sf.saxon.expr.parser.Evaluator$7.evaluate(Evaluator.java:199) at net.sf.saxon.expr.SystemFunctionCall.evaluateArguments(SystemFunctionCall.java:454) at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:546) at net.sf.saxon.expr.instruct.ForEach.map(ForEach.java:584) at net.sf.saxon.expr.ContextMappingIterator.next(ContextMappingIterator.java:61) at net.sf.saxon.om.FocusTrackingIterator.next(FocusTrackingIterator.java:76) at net.sf.saxon.om.SequenceIterator.forEachOrFail(SequenceIterator.java:135) at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:526) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:142) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:352) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:298) at com.saxonica.ee.bytecode.ByteCodeCandidate.processLeavingTail(ByteCodeCandidate.java:185) at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:264) at net.sf.saxon.trans.XsltController.callTemplate(XsltController.java:850) at net.sf.saxon.s9api.Xslt30Transformer.callTemplate(Xslt30Transformer.java:480) at net.sf.saxon.Transform.processFile(Transform.java:1306) at net.sf.saxon.Transform.doTransform(Transform.java:853) at net.sf.saxon.Transform.main(Transform.java:82) Fatal error during transformation: java.lang.NullPointerException: (no message)

Please register to edit this issue

Also available in: Atom PDF